diff options
author | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
commit | 97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch) | |
tree | 54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /include | |
parent | 5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff) | |
parent | 086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff) | |
download | FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz |
sync from head
Diffstat (limited to 'include')
-rw-r--r-- | include/protocols/timed.h | 4 | ||||
-rw-r--r-- | include/stdio.h | 1 | ||||
-rw-r--r-- | include/string.h | 3 | ||||
-rw-r--r-- | include/wchar.h | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/include/protocols/timed.h b/include/protocols/timed.h index 18747be..d26b4a2 100644 --- a/include/protocols/timed.h +++ b/include/protocols/timed.h @@ -90,11 +90,13 @@ struct tsp { #define TSPTYPENUMBER 25 #ifdef TSPTYPES -const char *tsptype[TSPTYPENUMBER] = +static char const * const tsptype[] = { "ANY", "ADJTIME", "ACK", "MASTERREQ", "MASTERACK", "SETTIME", "MASTERUP", "SLAVEUP", "ELECTION", "ACCEPT", "REFUSE", "CONFLICT", "RESOLVE", "QUIT", "DATE", "DATEREQ", "DATEACK", "TRACEON", "TRACEOFF", "MSITE", "MSITEREQ", "TEST", "SETDATE", "SETDATEREQ", "LOOP" }; +_Static_assert(sizeof(tsptype) / sizeof(const char *) == TSPTYPENUMBER, + "Size of tsptype does not match TSPTYPENUMBER"); #endif #endif /* !_TIMED_H_ */ diff --git a/include/stdio.h b/include/stdio.h index 4fc78b8..19b1e20 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -346,6 +346,7 @@ char *tempnam(const char *, const char *); FILE *fmemopen(void * __restrict, size_t, const char * __restrict); ssize_t getdelim(char ** __restrict, size_t * __restrict, int, FILE * __restrict); +FILE *open_memstream(char **, size_t *); int renameat(int, const char *, int, const char *); int vdprintf(int, const char * __restrict, __va_list); diff --git a/include/string.h b/include/string.h index e6a910b..ceffcf6 100644 --- a/include/string.h +++ b/include/string.h @@ -74,6 +74,9 @@ char *strcasestr(const char *, const char *) __pure; #endif char *strcat(char * __restrict, const char * __restrict); char *strchr(const char *, int) __pure; +#if __BSD_VISIBLE +char *strchrnul(const char*, int) __pure; +#endif int strcmp(const char *, const char *) __pure; int strcoll(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); diff --git a/include/wchar.h b/include/wchar.h index 9e8d807..4a3fe53 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -207,6 +207,7 @@ int wcwidth(wchar_t); #if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); +FILE *open_wmemstream(wchar_t **, size_t *); wchar_t *wcpcpy(wchar_t * __restrict, const wchar_t * __restrict); wchar_t *wcpncpy(wchar_t * __restrict, const wchar_t * __restrict, size_t); wchar_t *wcsdup(const wchar_t *) __malloc_like; |