diff options
author | sjg <sjg@FreeBSD.org> | 2014-08-19 06:50:54 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2014-08-19 06:50:54 +0000 |
commit | d7cd1d425cc1ea9451fa235e3af9b6625c3e0de2 (patch) | |
tree | b04f4bd7cd887f50e7d98af35f46b9834ff86c80 /include | |
parent | 3c8e37b1d04827f33c0c9a7594bd1b1ef7cdb3d3 (diff) | |
parent | 4fbde208c6460d576f64d6dc3cdc6cab085a4283 (diff) | |
download | FreeBSD-src-d7cd1d425cc1ea9451fa235e3af9b6625c3e0de2.zip FreeBSD-src-d7cd1d425cc1ea9451fa235e3af9b6625c3e0de2.tar.gz |
Merge head from 7/28
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile | 10 | ||||
-rw-r--r-- | include/Makefile.depend | 1 | ||||
-rw-r--r-- | include/dirent.h | 3 | ||||
-rw-r--r-- | include/grp.h | 6 | ||||
-rw-r--r-- | include/search.h | 20 | ||||
-rw-r--r-- | include/setjmp.h | 4 | ||||
-rw-r--r-- | include/signal.h | 2 | ||||
-rw-r--r-- | include/stdio.h | 10 | ||||
-rw-r--r-- | include/string.h | 6 | ||||
-rw-r--r-- | include/strings.h | 4 | ||||
-rw-r--r-- | include/termios.h | 2 | ||||
-rw-r--r-- | include/unistd.h | 6 | ||||
-rw-r--r-- | include/wchar.h | 2 | ||||
-rw-r--r-- | include/xlocale/Makefile | 2 | ||||
-rw-r--r-- | include/xlocale/_string.h | 2 | ||||
-rw-r--r-- | include/xlocale/_strings.h | 48 |
16 files changed, 101 insertions, 27 deletions
diff --git a/include/Makefile b/include/Makefile index b1ffc6f..8a5e9a2 100644 --- a/include/Makefile +++ b/include/Makefile @@ -6,11 +6,11 @@ .include <src.opts.mk> CLEANFILES= osreldate.h version vers.c -SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale +SUBDIR= arpa protocols rpcsvc rpc xlocale INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ - fts.h ftw.h getopt.h glob.h grp.h gssapi.h \ + fts.h ftw.h getopt.h glob.h grp.h \ ieeefp.h ifaddrs.h \ inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ @@ -45,6 +45,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ + fs/cuse \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ @@ -66,6 +67,11 @@ _dev_powermac_nvram= dev/powermac_nvram _dev_ieee488= dev/ieee488 .endif +.if ${MK_GSSAPI} != "no" +SUBDIR+= gssapi +INCS+= gssapi.h +.endif + .if ${MK_HESIOD} != "no" INCS+= hesiod.h .endif diff --git a/include/Makefile.depend b/include/Makefile.depend index 8b97128..482a633 100644 --- a/include/Makefile.depend +++ b/include/Makefile.depend @@ -3,6 +3,7 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} DIRDEPS = \ + bin/cat.host \ usr.bin/xinstall.host \ diff --git a/include/dirent.h b/include/dirent.h index f43210c..b894bb8 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -40,7 +40,7 @@ #include <sys/cdefs.h> #include <sys/dirent.h> -#if __BSD_VISIBLE || __XSI_VISIBLE +#if __XSI_VISIBLE /* * XXX this is probably illegal in the __XSI_VISIBLE case, but brings us closer * to the specification. @@ -63,6 +63,7 @@ typedef struct _dirdesc DIR; #define DTF_NODUP 0x0002 /* don't return duplicate names */ #define DTF_REWIND 0x0004 /* rewind after reading union stack */ #define __DTF_READALL 0x0008 /* everything has been read */ +#define __DTF_SKIPREAD 0x0010 /* assume internal buffer is populated */ #else /* !__BSD_VISIBLE */ diff --git a/include/grp.h b/include/grp.h index e7f65ec..b10fd0f 100644 --- a/include/grp.h +++ b/include/grp.h @@ -61,7 +61,7 @@ struct group { }; __BEGIN_DECLS -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE void endgrent(void); struct group *getgrent(void); #endif @@ -74,11 +74,11 @@ int pwcache_groupdb(int (*)(int), void (*)(void), struct group * (*)(const char *), struct group * (*)(gid_t)); #endif -#if __BSD_VISIBLE || __XSI_VISIBLE +#if __XSI_VISIBLE /* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */ int setgrent(void); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); int getgrnam_r(const char *, struct group *, char *, size_t, diff --git a/include/search.h b/include/search.h index 4e4606f..068c82d 100644 --- a/include/search.h +++ b/include/search.h @@ -1,8 +1,8 @@ /*- - * Written by J.T. Conklin <jtc@netbsd.org> + * Written by J.T. Conklin <jtc@NetBSD.org> * Public domain. * - * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ + * $NetBSD: search.h,v 1.16 2005/02/03 04:39:32 perry Exp $ * $FreeBSD$ */ @@ -45,6 +45,15 @@ struct que_elem { }; #endif +#if __BSD_VISIBLE +struct _ENTRY; +struct hsearch_data { + struct _ENTRY *table; + size_t size; + size_t filled; +}; +#endif + __BEGIN_DECLS int hcreate(size_t); void hdestroy(void); @@ -61,6 +70,13 @@ void *tfind(const void *, void * const *, int (*)(const void *, const void *)); void *tsearch(const void *, void **, int (*)(const void *, const void *)); void twalk(const void *, void (*)(const void *, VISIT, int)); + +#if __BSD_VISIBLE +int hcreate_r(size_t, struct hsearch_data *); +void hdestroy_r(struct hsearch_data *); +int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); +#endif + __END_DECLS #endif /* !_SEARCH_H_ */ diff --git a/include/setjmp.h b/include/setjmp.h index bf03f6f..598e07a 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -44,7 +44,7 @@ #include <machine/setjmp.h> __BEGIN_DECLS -#if __BSD_VISIBLE || __XSI_VISIBLE >= 600 +#if __XSI_VISIBLE >= 600 void _longjmp(jmp_buf, int) __dead2; int _setjmp(jmp_buf) __returns_twice; #endif @@ -53,7 +53,7 @@ void longjmp(jmp_buf, int) __dead2; void longjmperror(void); #endif int setjmp(jmp_buf) __returns_twice; -#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE +#if __POSIX_VISIBLE || __XSI_VISIBLE void siglongjmp(sigjmp_buf, int) __dead2; int sigsetjmp(sigjmp_buf, int) __returns_twice; #endif diff --git a/include/signal.h b/include/signal.h index e7447df..dca19aa 100644 --- a/include/signal.h +++ b/include/signal.h @@ -108,7 +108,7 @@ int xsi_sigpause(int); int siginterrupt(int, int); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 void psignal(unsigned int, const char *); #endif diff --git a/include/stdio.h b/include/stdio.h index 19b1e20..512e60e 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -47,7 +47,7 @@ typedef __size_t size_t; #define _SIZE_T_DECLARED #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 #ifndef _OFF_T_DECLARED #define _OFF_T_DECLARED typedef __off_t off_t; @@ -58,7 +58,7 @@ typedef __ssize_t ssize_t; #endif #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #ifndef _VA_LIST_DECLARED typedef __va_list va_list; #define _VA_LIST_DECLARED @@ -290,7 +290,7 @@ int vsscanf(const char * __restrict, const char * __restrict, __va_list) /* * Functions defined in all versions of POSIX 1003.1. */ -#if __BSD_VISIBLE || __POSIX_VISIBLE <= 199506 +#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506) #define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */ #endif @@ -342,7 +342,7 @@ int putw(int, FILE *); char *tempnam(const char *, const char *); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 +#if __POSIX_VISIBLE >= 200809 FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); @@ -387,7 +387,7 @@ ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict); int (dprintf)(int, const char * __restrict, ...); #endif -#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */ +#endif /* __POSIX_VISIBLE >= 200809 */ /* * Routines that are purely local. diff --git a/include/string.h b/include/string.h index ceffcf6..af8b0d4 100644 --- a/include/string.h +++ b/include/string.h @@ -65,7 +65,7 @@ void *memmem(const void *, size_t, const void *, size_t) __pure; #endif void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *stpcpy(char * __restrict, const char * __restrict); char *stpncpy(char * __restrict, const char * __restrict, size_t); #endif @@ -99,7 +99,7 @@ void strmode(int, char *); char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *strndup(const char *, size_t) __malloc_like; size_t strnlen(const char *, size_t) __pure; #endif @@ -111,7 +111,7 @@ char *strrchr(const char *, int) __pure; #if __BSD_VISIBLE char *strsep(char **, const char *); #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 char *strsignal(int); #endif size_t strspn(const char *, const char *) __pure; diff --git a/include/strings.h b/include/strings.h index f272078..4fb9311 100644 --- a/include/strings.h +++ b/include/strings.h @@ -59,6 +59,10 @@ char *rindex(const char *, int) __pure; /* LEGACY */ #endif int strcasecmp(const char *, const char *) __pure; int strncasecmp(const char *, const char *, size_t) __pure; + +#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#include <xlocale/_strings.h> +#endif __END_DECLS #endif /* _STRINGS_H_ */ diff --git a/include/termios.h b/include/termios.h index e41da9f..ed8e328 100644 --- a/include/termios.h +++ b/include/termios.h @@ -81,7 +81,7 @@ int tcflow(int, int); int tcflush(int, int); int tcsendbreak(int, int); -#if __POSIX_VISIBLE >= 200112 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200112 pid_t tcgetsid(int); #endif #if __BSD_VISIBLE diff --git a/include/unistd.h b/include/unistd.h index 5868ba2..f1913b6 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -426,7 +426,7 @@ int truncate(const char *, off_t); #endif #endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 int faccessat(int, const char *, int, int); int fchownat(int, const char *, uid_t, gid_t, int); int fexecve(int, char *const [], char *const []); @@ -434,14 +434,14 @@ int linkat(int, const char *, int, const char *, int); ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t); int symlinkat(const char *, int, const char *); int unlinkat(int, const char *, int); -#endif /* __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE */ +#endif /* __POSIX_VISIBLE >= 200809 */ /* * symlink() was originally in POSIX.1a, which was withdrawn after * being overtaken by events (1003.1-2001). It was in XPG4.2, and of * course has been in BSD since 4.2. */ -#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 int symlink(const char * __restrict, const char * __restrict); #endif diff --git a/include/wchar.h b/include/wchar.h index 8233bdf..84a4a97 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -204,7 +204,7 @@ int wcwidth(wchar_t); #define wcwidth(_c) __wcwidth(_c) #endif -#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +#if __POSIX_VISIBLE >= 200809 size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); FILE *open_wmemstream(wchar_t **, size_t *); diff --git a/include/xlocale/Makefile b/include/xlocale/Makefile index 2dd4a98..0ece6d2 100644 --- a/include/xlocale/Makefile +++ b/include/xlocale/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\ - _stdlib.h _string.h _time.h _uchar.h _wchar.h + _stdlib.h _string.h _strings.h _time.h _uchar.h _wchar.h INCSDIR=${INCLUDEDIR}/xlocale .include <bsd.prog.mk> diff --git a/include/xlocale/_string.h b/include/xlocale/_string.h index 2627280..a7c146e 100644 --- a/include/xlocale/_string.h +++ b/include/xlocale/_string.h @@ -53,9 +53,7 @@ size_t strxfrm_l(char *, const char *, size_t, locale_t); #ifdef _XLOCALE_H_ #ifndef _XLOCALE_STRING2_H #define _XLOCALE_STRING2_H -int strcasecmp_l(const char *, const char *, locale_t); char *strcasestr_l(const char *, const char *, locale_t); -int strncasecmp_l(const char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING2_H */ #endif /* _XLOCALE_H_ */ diff --git a/include/xlocale/_strings.h b/include/xlocale/_strings.h new file mode 100644 index 0000000..da1cff3 --- /dev/null +++ b/include/xlocale/_strings.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2011, 2012 The FreeBSD Foundation + * All rights reserved. + * + * 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 AUTHOR 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 AUTHOR 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. + * + * $FreeBSD$ + */ + +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +/* + * This file is included from both strings.h and xlocale.h. We need to expose + * the declarations unconditionally if we are included from xlocale.h, but only + * if we are in POSIX2008 mode if included from string.h. + */ + +#ifndef _XLOCALE_STRINGS1_H +#define _XLOCALE_STRINGS1_H + +/* + * POSIX2008 functions + */ +int strcasecmp_l(const char *, const char *, locale_t); +int strncasecmp_l(const char *, const char *, size_t, locale_t); +#endif /* _XLOCALE_STRINGS1_H */ |