Loading...
include/ndbm.h Libc-583 Libc-262
--- Libc/Libc-583/include/ndbm.h
+++ Libc/Libc-262/include/ndbm.h
@@ -3,20 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -61,68 +60,39 @@
 #ifndef _NDBM_H_
 #define	_NDBM_H_
 
-#include <_types.h>
+#include <db.h>
 
-#ifndef _MODE_T
-typedef __darwin_mode_t	mode_t;
-#define _MODE_T
-#endif
-
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef __darwin_size_t	size_t;
-#endif
-
-#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
 /* Map dbm interface onto db(3). */
-#include <fcntl.h>
 #define DBM_RDONLY	O_RDONLY
-#endif
 
 /* Flags to dbm_store(). */
 #define DBM_INSERT      0
 #define DBM_REPLACE     1
 
-#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
 /*
  * The db(3) support for ndbm(3) always appends this suffix to the
  * file name to avoid overwriting the user's original database.
  */
 #define	DBM_SUFFIX	".db"
-#endif
 
 typedef struct {
-	void *dptr;
-	size_t dsize;
+	char *dptr;
+	int dsize;
 } datum;
 
-#ifndef _DBM
-#define _DBM
-typedef struct {
-    char __opaque[sizeof(int) + 8 * sizeof(void *)];
-} DBM;
-#endif /* _DBM */
-
-#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
+typedef DB DBM;
 #define	dbm_pagfno(a)	DBM_PAGFNO_NOT_AVAILABLE
-#endif
 
 __BEGIN_DECLS
-int	 dbm_clearerr( DBM *);
-void	 dbm_close(DBM *);
-int	 dbm_delete(DBM *, datum);
-#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
-int	 dbm_dirfno(DBM *);
-#endif
-int	 dbm_error( DBM *);
-datum	 dbm_fetch(DBM *, datum);
-datum	 dbm_firstkey(DBM *);
-#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
-long	 dbm_forder(DBM *, datum);
-#endif
-datum	 dbm_nextkey(DBM *);
-DBM	*dbm_open(const char *, int, mode_t);
-int	 dbm_store(DBM *, datum, datum, int);
+void	 dbm_close __P((DBM *));
+int	 dbm_delete __P((DBM *, datum));
+datum	 dbm_fetch __P((DBM *, datum));
+datum	 dbm_firstkey __P((DBM *));
+long	 dbm_forder __P((DBM *, datum));
+datum	 dbm_nextkey __P((DBM *));
+DBM	*dbm_open __P((const char *, int, int));
+int	 dbm_store __P((DBM *, datum, datum, int));
+int	 dbm_dirfno __P((DBM *));
 __END_DECLS
 
 #endif /* !_NDBM_H_ */