Module Name:    src
Committed By:   uebayasi
Date:           Fri Apr 30 14:36:18 UTC 2010

Modified Files:
        src/include [uebayasi-xip]: Makefile err.h math.h netdb.h paths.h
            stdio.h stdlib.h unistd.h util.h wchar.h wctype.h
        src/include/ssp [uebayasi-xip]: stdio.h
Added Files:
        src/include [uebayasi-xip]: cdbr.h cdbw.h

Log Message:
Sync with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.131.16.1 src/include/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/include/cdbr.h src/include/cdbw.h
cvs rdiff -u -r1.14 -r1.14.44.1 src/include/err.h
cvs rdiff -u -r1.50 -r1.50.2.1 src/include/math.h
cvs rdiff -u -r1.62 -r1.62.2.1 src/include/netdb.h
cvs rdiff -u -r1.36 -r1.36.2.1 src/include/paths.h
cvs rdiff -u -r1.75 -r1.75.2.1 src/include/stdio.h
cvs rdiff -u -r1.90 -r1.90.2.1 src/include/stdlib.h
cvs rdiff -u -r1.121 -r1.121.2.1 src/include/unistd.h
cvs rdiff -u -r1.54 -r1.54.2.1 src/include/util.h
cvs rdiff -u -r1.28 -r1.28.2.1 src/include/wchar.h
cvs rdiff -u -r1.6 -r1.6.44.1 src/include/wctype.h
cvs rdiff -u -r1.3 -r1.3.18.1 src/include/ssp/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/Makefile
diff -u src/include/Makefile:1.131 src/include/Makefile:1.131.16.1
--- src/include/Makefile:1.131	Wed May 28 12:28:12 2008
+++ src/include/Makefile	Fri Apr 30 14:36:17 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.131 2008/05/28 12:28:12 ad Exp $
+#	$NetBSD: Makefile,v 1.131.16.1 2010/04/30 14:36:17 uebayasi Exp $
 #	@(#)Makefile	8.2 (Berkeley) 1/4/94
 
 # Doing a make includes builds /usr/include
@@ -8,7 +8,7 @@
 # Missing: mp.h
 
 INCS=	a.out.h aio.h ar.h assert.h atomic.h \
-	bitstring.h bm.h complex.h cpio.h ctype.h \
+	bitstring.h bm.h cdbr.h cdbw.h complex.h cpio.h ctype.h \
 	db.h dirent.h disktab.h dlfcn.h err.h errno.h fmtmsg.h fnmatch.h \
 	fstab.h fts.h ftw.h getopt.h glob.h grp.h ifaddrs.h iconv.h \
 	inttypes.h iso646.h kvm.h langinfo.h libgen.h \

Index: src/include/err.h
diff -u src/include/err.h:1.14 src/include/err.h:1.14.44.1
--- src/include/err.h:1.14	Thu Feb  3 04:39:32 2005
+++ src/include/err.h	Fri Apr 30 14:36:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.h,v 1.14 2005/02/03 04:39:32 perry Exp $	*/
+/*	$NetBSD: err.h,v 1.14.44.1 2010/04/30 14:36:17 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -46,21 +46,21 @@
 
 __BEGIN_DECLS
 __dead void	err(int, const char *, ...)
-		    __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+		     __printflike(2, 3) __dead;
 __dead void	verr(int, const char *, _BSD_VA_LIST_)
-		    __attribute__((__noreturn__, __format__(__printf__, 2, 0)));
+		    __printflike(2, 0) __dead;
 __dead void	errx(int, const char *, ...)
-		    __attribute__((__noreturn__, __format__(__printf__, 2, 3)));
+		     __printflike(2, 3) __dead;
 __dead void	verrx(int, const char *, _BSD_VA_LIST_)
-		    __attribute__((__noreturn__, __format__(__printf__, 2, 0)));
+		    __printflike(2, 0) __dead;
 void		warn(const char *, ...)
-		    __attribute__((__format__(__printf__, 1, 2)));
+		    __printflike(1, 2);
 void		vwarn(const char *, _BSD_VA_LIST_)
-		    __attribute__((__format__(__printf__, 1, 0)));
+		    __printflike(1, 0);
 void		warnx(const char *, ...)
-		    __attribute__((__format__(__printf__, 1, 2)));
+		    __printflike(1, 2);
 void		vwarnx(const char *, _BSD_VA_LIST_)
-		    __attribute__((__format__(__printf__, 1, 0)));
+		    __printflike(1, 0);
 __END_DECLS
 
 #endif /* !_ERR_H_ */

Index: src/include/math.h
diff -u src/include/math.h:1.50 src/include/math.h:1.50.2.1
--- src/include/math.h:1.50	Mon Jan 11 16:28:39 2010
+++ src/include/math.h	Fri Apr 30 14:36:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.50 2010/01/11 16:28:39 christos Exp $	*/
+/*	$NetBSD: math.h,v 1.50.2.1 2010/04/30 14:36:17 uebayasi Exp $	*/
 
 /*
  * ====================================================
@@ -59,8 +59,12 @@
  * ANSI/POSIX
  */
 /* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */
+#if __GNUC_PREREQ__(3, 3)
+#define HUGE_VAL	__builtin_huge_val()
+#else
 extern const union __double_u __infinity;
 #define HUGE_VAL	__infinity.__val
+#endif
 
 /*
  * ISO C99
@@ -72,14 +76,21 @@
     ((_XOPEN_SOURCE  - 0) >= 600) || \
     defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
 /* 7.12#3 HUGE_VAL, HUGELF, HUGE_VALL */
+#if __GNUC_PREREQ__(3, 3)
+#define	HUGE_VALF	__builtin_huge_valf()
+#define	HUGE_VALL	__builtin_huge_vall()
+#else
 extern const union __float_u __infinityf;
 #define	HUGE_VALF	__infinityf.__val
 
 extern const union __long_double_u __infinityl;
 #define	HUGE_VALL	__infinityl.__val
+#endif
 
 /* 7.12#4 INFINITY */
-#ifdef __INFINITY
+#if __GNUC_PREREQ__(3, 3)
+#define	INFINITY	__builtin_inff()
+#elif defined(__INFINITY)
 #define	INFINITY	__INFINITY	/* float constant which overflows */
 #else
 #define	INFINITY	HUGE_VALF	/* positive infinity */

Index: src/include/netdb.h
diff -u src/include/netdb.h:1.62 src/include/netdb.h:1.62.2.1
--- src/include/netdb.h:1.62	Fri Oct  2 02:45:29 2009
+++ src/include/netdb.h	Fri Apr 30 14:36:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: netdb.h,v 1.62 2009/10/02 02:45:29 tsarna Exp $	*/
+/*	$NetBSD: netdb.h,v 1.62.2.1 2010/04/30 14:36:17 uebayasi Exp $	*/
 
 /*
  * ++Copyright++ 1980, 1983, 1988, 1993
@@ -125,6 +125,9 @@
 #ifndef _PATH_SERVICES
 #define	_PATH_SERVICES	"/etc/services"
 #endif
+#ifndef _PATH_SERVICES_CDB
+#define	_PATH_SERVICES_CDB "/var/db/services.cdb"
+#endif
 #ifndef _PATH_SERVICES_DB
 #define	_PATH_SERVICES_DB "/var/db/services.db"
 #endif

Index: src/include/paths.h
diff -u src/include/paths.h:1.36 src/include/paths.h:1.36.2.1
--- src/include/paths.h:1.36	Wed Feb  3 18:11:18 2010
+++ src/include/paths.h	Fri Apr 30 14:36:17 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: paths.h,v 1.36 2010/02/03 18:11:18 roy Exp $	*/
+/*	$NetBSD: paths.h,v 1.36.2.1 2010/04/30 14:36:17 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -82,6 +82,7 @@
 #define	_PATH_MIXER0	"/dev/mixer0"
 #define	_PATH_NOLOGIN	"/etc/nologin"
 #define	_PATH_PRINTCAP	"/etc/printcap"
+#define _PATH_POWER	"/dev/power"
 #define	_PATH_PUD	"/dev/pud"
 #define	_PATH_PUFFS	"/dev/puffs"
 #define	_PATH_RANDOM	"/dev/random"

Index: src/include/stdio.h
diff -u src/include/stdio.h:1.75 src/include/stdio.h:1.75.2.1
--- src/include/stdio.h:1.75	Mon Jan 11 20:39:29 2010
+++ src/include/stdio.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.75 2010/01/11 20:39:29 joerg Exp $	*/
+/*	$NetBSD: stdio.h,v 1.75.2.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -226,14 +226,14 @@
 char	*fgets(char * __restrict, int, FILE * __restrict);
 FILE	*fopen(const char * __restrict , const char * __restrict);
 int	 fprintf(FILE * __restrict , const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
+		__printflike(2, 3);
 int	 fputc(int, FILE *);
 int	 fputs(const char * __restrict, FILE * __restrict);
 size_t	 fread(void * __restrict, size_t, size_t, FILE * __restrict);
 FILE	*freopen(const char * __restrict, const char * __restrict,
 	    FILE * __restrict);
 int	 fscanf(FILE * __restrict, const char * __restrict, ...)
-    __attribute__((__format__(__scanf__, 2, 3)));
+		__scanflike(2, 3);
 int	 fseek(FILE *, long, int);
 int	 fsetpos(FILE *, const fpos_t *);
 long	 ftell(FILE *);
@@ -245,33 +245,33 @@
 ssize_t	 getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
 void	 perror(const char *);
 int	 printf(const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 1, 2)));
+		__printflike(1, 2);
 int	 putc(int, FILE *);
 int	 putchar(int);
 int	 puts(const char *);
 int	 remove(const char *);
 void	 rewind(FILE *);
 int	 scanf(const char * __restrict, ...)
-    __attribute__((__format__(__scanf__, 1, 2)));
+		__scanflike(1, 2);
 void	 setbuf(FILE * __restrict, char * __restrict);
 int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t);
 int	 sscanf(const char * __restrict, const char * __restrict, ...)
-    __attribute__((__format__(__scanf__, 2, 3)));
+		__scanflike(2, 3);
 FILE	*tmpfile(void);
 int	 ungetc(int, FILE *);
 int	 vfprintf(FILE * __restrict, const char * __restrict, _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 2, 0)));
+		__printflike(2, 0);
 int	 vprintf(const char * __restrict, _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 1, 0)));
+		__printflike(1, 0);
 
 #ifndef __AUDIT__
 char	*gets(char *);
 int	 sprintf(char * __restrict, const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
+		__printflike(2, 3);
 char	*tmpnam(char *);
 int	 vsprintf(char * __restrict, const char * __restrict,
     _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 2, 0)));
+		__printflike(2, 0);
 #endif
 
 #if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
@@ -338,10 +338,10 @@
     defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
 __BEGIN_DECLS
 int	 snprintf(char * __restrict, size_t, const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 3, 4)));
+		__printflike(3, 4);
 int	 vsnprintf(char * __restrict, size_t, const char * __restrict,
 	    _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 3, 0)));
+		__printflike(3, 0);
 __END_DECLS
 #endif
 
@@ -382,12 +382,12 @@
 #if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
 __BEGIN_DECLS
 int	 vscanf(const char * __restrict, _BSD_VA_LIST_)
-    __attribute__((__format__(__scanf__, 1, 0)));
+		__scanflike(1, 0);
 int	 vfscanf(FILE * __restrict, const char * __restrict, _BSD_VA_LIST_)
-    __attribute__((__format__(__scanf__, 2, 0)));
+		__scanflike(2, 0);
 int	 vsscanf(const char * __restrict, const char * __restrict,
     _BSD_VA_LIST_)
-    __attribute__((__format__(__scanf__, 2, 0)));
+    __scanflike(2, 0);
 __END_DECLS
 #endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */
 
@@ -404,7 +404,7 @@
 
 __BEGIN_DECLS
 int	 asprintf(char ** __restrict, const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
+		__printflike(2, 3);
 char	*fgetln(FILE * __restrict, size_t * __restrict);
 char	*fparseln(FILE *, size_t *, size_t *, const char[3], int);
 int	 fpurge(FILE *);
@@ -412,9 +412,9 @@
 int	 setlinebuf(FILE *);
 int	 vasprintf(char ** __restrict, const char * __restrict,
     _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 2, 0)));
+		__printflike(2, 0);
 const char *fmtcheck(const char *, const char *)
-    __attribute__((__format_arg__(2)));
+		__format_arg(2);
 __END_DECLS
 
 /*

Index: src/include/stdlib.h
diff -u src/include/stdlib.h:1.90 src/include/stdlib.h:1.90.2.1
--- src/include/stdlib.h:1.90	Sun Nov 15 22:21:03 2009
+++ src/include/stdlib.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdlib.h,v 1.90 2009/11/15 22:21:03 christos Exp $	*/
+/*	$NetBSD: stdlib.h,v 1.90.2.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -299,7 +299,7 @@
 	    uint32_t[3]);
 
 void	 setproctitle(const char *, ...)
-	    __attribute__((__format__(__printf__, 1, 2)));
+	    __printflike(1, 2);
 const char *getprogname(void) __attribute__((const));
 void	setprogname(const char *);
 

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.121 src/include/unistd.h:1.121.2.1
--- src/include/unistd.h:1.121	Wed Jul 22 19:48:27 2009
+++ src/include/unistd.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.121 2009/07/22 19:48:27 kleink Exp $	*/
+/*	$NetBSD: unistd.h,v 1.121.2.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -259,7 +259,7 @@
 int	 setpgrp(pid_t, pid_t);			/* obsoleted by setpgid() */
 int	 setregid(gid_t, gid_t);
 int	 setreuid(uid_t, uid_t);
-void	 swab(const void *, void *, size_t);
+void	 swab(const void * __restrict, void * __restrict, ssize_t);
 int	 symlink(const char *, const char *);
 void	 sync(void);
 useconds_t ualarm(useconds_t, useconds_t);

Index: src/include/util.h
diff -u src/include/util.h:1.54 src/include/util.h:1.54.2.1
--- src/include/util.h:1.54	Wed Jan 27 19:10:31 2010
+++ src/include/util.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.h,v 1.54 2010/01/27 19:10:31 drochner Exp $	*/
+/*	$NetBSD: util.h,v 1.54.2.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 1995
@@ -137,10 +137,10 @@
 void 		*erealloc(void *, size_t);
 struct __sFILE	*efopen(const char *, const char *);
 int	 	easprintf(char ** __restrict, const char * __restrict, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
+			__printflike(2, 3);
 int		evasprintf(char ** __restrict, const char * __restrict,
     _BSD_VA_LIST_)
-    __attribute__((__format__(__printf__, 2, 0)));
+			__printflike(2, 0);
 __END_DECLS
 
 #endif /* !_UTIL_H_ */

Index: src/include/wchar.h
diff -u src/include/wchar.h:1.28 src/include/wchar.h:1.28.2.1
--- src/include/wchar.h:1.28	Sun Nov 15 22:21:03 2009
+++ src/include/wchar.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wchar.h,v 1.28 2009/11/15 22:21:03 christos Exp $	*/
+/*	$NetBSD: wchar.h,v 1.28.2.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -60,8 +60,8 @@
 
 #include <sys/cdefs.h>
 #include <sys/featuretest.h>
-#include <machine/ansi.h>
 #include <machine/wchar_limits.h>
+#include <sys/ansi.h>
 #include <sys/null.h>
 
 #include <stdio.h> /* for FILE* */

Index: src/include/wctype.h
diff -u src/include/wctype.h:1.6 src/include/wctype.h:1.6.44.1
--- src/include/wctype.h:1.6	Thu Feb  3 04:39:32 2005
+++ src/include/wctype.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: wctype.h,v 1.6 2005/02/03 04:39:32 perry Exp $	*/
+/*	$NetBSD: wctype.h,v 1.6.44.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -32,7 +32,7 @@
 #define	_WCTYPE_H_
 
 #include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <sys/ansi.h>
 
 #ifdef	_BSD_WINT_T_
 typedef	_BSD_WINT_T_    wint_t;

Index: src/include/ssp/stdio.h
diff -u src/include/ssp/stdio.h:1.3 src/include/ssp/stdio.h:1.3.18.1
--- src/include/ssp/stdio.h:1.3	Mon Apr 28 20:22:54 2008
+++ src/include/ssp/stdio.h	Fri Apr 30 14:36:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.3 2008/04/28 20:22:54 martin Exp $	*/
+/*	$NetBSD: stdio.h,v 1.3.18.1 2010/04/30 14:36:18 uebayasi Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -35,14 +35,16 @@
 
 __BEGIN_DECLS
 int __sprintf_chk(char *__restrict, int, size_t, const char *__restrict, ...)
-    __attribute__((__format__(__printf__, 4, 5)));
+    __printflike(4, 5);
 int __vsprintf_chk(char *__restrict, int, size_t, const char *__restrict,
-    _BSD_VA_LIST_) __attribute__((__format__(__printf__, 4, 0)));
+    _BSD_VA_LIST_)
+    __printflike(4, 0);
 int __snprintf_chk(char *__restrict, size_t, int, size_t,
-    const char *__restrict, ...) __attribute__((__format__(__printf__, 5, 6)));
+    const char *__restrict, ...)
+    __printflike(5, 6);
 int __vsnprintf_chk(char *__restrict, size_t, int, size_t,
      const char *__restrict, _BSD_VA_LIST_)
-     __attribute__((__format__(__printf__, 5, 0)));
+    __printflike(5, 0);
 char *__gets_chk(char *, size_t);
 char *__fgets_chk(char *, int, size_t, FILE *);
 __END_DECLS

Added files:

Index: src/include/cdbr.h
diff -u /dev/null src/include/cdbr.h:1.1.2.2
--- /dev/null	Fri Apr 30 14:36:18 2010
+++ src/include/cdbr.h	Fri Apr 30 14:36:17 2010
@@ -0,0 +1,56 @@
+/*	$NetBSD: cdbr.h,v 1.1.2.2 2010/04/30 14:36:17 uebayasi Exp $	*/
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Joerg Sonnenberger.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef	_CDBR_H
+#define	_CDBR_H
+
+#include <sys/cdefs.h>
+#include <inttypes.h>
+#include <stddef.h>
+
+#define	CDBR_DEFAULT	0
+
+struct cdbr;
+
+__BEGIN_DECLS
+
+struct cdbr	*cdbr_open(const char *, int);
+uint32_t	 cdbr_entries(struct cdbr *);
+int		 cdbr_get(struct cdbr *, uint32_t, const void **, size_t *);
+int		 cdbr_find(struct cdbr *, const void *, size_t,
+    const void **, size_t *);
+void		 cdbr_close(struct cdbr *);
+
+__END_DECLS
+
+#endif /* _CDBR_H */
Index: src/include/cdbw.h
diff -u /dev/null src/include/cdbw.h:1.1.2.2
--- /dev/null	Fri Apr 30 14:36:18 2010
+++ src/include/cdbw.h	Fri Apr 30 14:36:17 2010
@@ -0,0 +1,58 @@
+/*	$NetBSD: cdbw.h,v 1.1.2.2 2010/04/30 14:36:17 uebayasi Exp $	*/
+/*-
+ * Copyright (c) 2010 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Joerg Sonnenberger.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef	_CDBW_H
+#define	_CDBW_H
+
+#include <sys/cdefs.h>
+#include <inttypes.h>
+#include <stddef.h>
+
+struct cdbw;
+
+__BEGIN_DECLS
+
+struct cdbw	*cdbw_open(void);
+int		 cdbw_put(struct cdbw *, const void *, size_t,
+    const void *, size_t);
+int		 cdbw_put_data(struct cdbw *, const void *, size_t,
+    uint32_t *);
+int		 cdbw_put_key(struct cdbw *, const void *, size_t,
+    uint32_t);
+int		 cdbw_output(struct cdbw *, int, const char[16],
+    uint32_t (*)(void));
+void		 cdbw_close(struct cdbw *);
+
+__END_DECLS
+
+#endif /* _CDBW_H */

Reply via email to