Fix visibility of various C99 features, esp. for C++11.
This commit is contained in:
parent
6f346dc5f4
commit
af730bf1c8
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $ */
|
/* $NetBSD: ctype.h,v 1.35 2020/03/20 01:08:42 joerg Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989 The Regents of the University of California.
|
* Copyright (c) 1989 The Regents of the University of California.
|
||||||
@ -86,8 +86,11 @@ int _tolower(int);
|
|||||||
int _toupper(int);
|
int _toupper(int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \
|
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
|
||||||
(_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE)
|
!defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >= 200112L || \
|
||||||
|
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||||
|
(__cplusplus - 0) >= 201103L || (_XOPEN_SOURCE - 0) > 600 || \
|
||||||
|
defined(_NETBSD_SOURCE))
|
||||||
int isblank(int);
|
int isblank(int);
|
||||||
#endif
|
#endif
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: stdio.h,v 1.98 2019/12/13 20:25:16 mrg Exp $ */
|
/* $NetBSD: stdio.h,v 1.99 2020/03/20 01:08:42 joerg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1990, 1993
|
* Copyright (c) 1990, 1993
|
||||||
@ -41,6 +41,13 @@
|
|||||||
#include <sys/featuretest.h>
|
#include <sys/featuretest.h>
|
||||||
#include <sys/ansi.h>
|
#include <sys/ansi.h>
|
||||||
|
|
||||||
|
#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
|
||||||
|
!defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >= 200809L || \
|
||||||
|
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||||
|
(__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE))
|
||||||
|
#define __STDIO_C99_FEATURES
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _BSD_SIZE_T_
|
#ifdef _BSD_SIZE_T_
|
||||||
typedef _BSD_SIZE_T_ size_t;
|
typedef _BSD_SIZE_T_ size_t;
|
||||||
#undef _BSD_SIZE_T_
|
#undef _BSD_SIZE_T_
|
||||||
@ -307,8 +314,8 @@ __END_DECLS
|
|||||||
/*
|
/*
|
||||||
* IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
|
* IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
|
||||||
*/
|
*/
|
||||||
#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
|
#if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >= 199506L || \
|
||||||
defined(_REENTRANT) || defined(_NETBSD_SOURCE)
|
(_XOPEN_SOURCE - 0) >= 500 || defined(_REENTRANT)
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
void flockfile(FILE *);
|
void flockfile(FILE *);
|
||||||
int ftrylockfile(FILE *);
|
int ftrylockfile(FILE *);
|
||||||
@ -318,7 +325,7 @@ int getchar_unlocked(void);
|
|||||||
int putc_unlocked(int, FILE *);
|
int putc_unlocked(int, FILE *);
|
||||||
int putchar_unlocked(int);
|
int putchar_unlocked(int);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#endif /* _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
|
#endif /* C99 || _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions defined in POSIX 1003.2 and XPG2 or later.
|
* Functions defined in POSIX 1003.2 and XPG2 or later.
|
||||||
@ -339,11 +346,9 @@ __END_DECLS
|
|||||||
/*
|
/*
|
||||||
* Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
|
* Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
|
||||||
*/
|
*/
|
||||||
#if ((__STDC_VERSION__ - 0) >= 199901L) || \
|
#if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >= 200112L || \
|
||||||
((_POSIX_C_SOURCE - 0) >= 200112L) || \
|
|
||||||
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
|
(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
|
||||||
((_XOPEN_SOURCE - 0) >= 500) || \
|
(_XOPEN_SOURCE - 0) >= 500
|
||||||
defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int snprintf(char * __restrict, size_t, const char * __restrict, ...)
|
int snprintf(char * __restrict, size_t, const char * __restrict, ...)
|
||||||
__printflike(3, 4);
|
__printflike(3, 4);
|
||||||
@ -387,7 +392,7 @@ __END_DECLS
|
|||||||
* Functions defined in ISO C99. Still put under _NETBSD_SOURCE due to
|
* Functions defined in ISO C99. Still put under _NETBSD_SOURCE due to
|
||||||
* backward compatible.
|
* backward compatible.
|
||||||
*/
|
*/
|
||||||
#if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
|
#if defined(__STDIO_C99_FEATURES)
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int vscanf(const char * __restrict, __va_list)
|
int vscanf(const char * __restrict, __va_list)
|
||||||
__scanflike(1, 0);
|
__scanflike(1, 0);
|
||||||
@ -397,7 +402,7 @@ int vsscanf(const char * __restrict, const char * __restrict,
|
|||||||
__va_list)
|
__va_list)
|
||||||
__scanflike(2, 0);
|
__scanflike(2, 0);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */
|
#endif /* C99 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines that are purely local.
|
* Routines that are purely local.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: wchar.h,v 1.43 2018/12/28 13:11:46 maya Exp $ */
|
/* $NetBSD: wchar.h,v 1.44 2020/03/20 01:08:42 joerg Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c)1999 Citrus Project,
|
* Copyright (c)1999 Citrus Project,
|
||||||
@ -151,8 +151,8 @@ long int wcstol(const wchar_t * __restrict,
|
|||||||
wchar_t ** __restrict, int);
|
wchar_t ** __restrict, int);
|
||||||
double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
|
double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
|
||||||
|
|
||||||
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
|
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
|
||||||
defined(_NETBSD_SOURCE) || \
|
(__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \
|
||||||
(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
|
(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
|
||||||
float wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
|
float wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
|
||||||
long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
|
long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
|
||||||
@ -194,7 +194,7 @@ int vwprintf(const wchar_t * __restrict, __va_list);
|
|||||||
int wprintf(const wchar_t * __restrict, ...);
|
int wprintf(const wchar_t * __restrict, ...);
|
||||||
int wscanf(const wchar_t * __restrict, ...);
|
int wscanf(const wchar_t * __restrict, ...);
|
||||||
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
|
#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
|
||||||
defined(_NETBSD_SOURCE) || \
|
(__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) || \
|
||||||
(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
|
(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
|
||||||
int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list);
|
int vfwscanf(FILE * __restrict, const wchar_t * __restrict, __va_list);
|
||||||
int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
|
int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
|
||||||
|
Loading…
Reference in New Issue
Block a user