Make gethostname, getdtablesize, mktemp, ualarm available in BSD, XOPEN_SOURCE >= 500.

This commit is contained in:
Dionna Glaze 2017-06-29 08:30:04 +02:00 committed by Corinna Vinschen
parent d54ee34e23
commit f70aad3de4
1 changed files with 5 additions and 2 deletions

View File

@ -259,9 +259,8 @@ int _EXFUN(truncate, (const char *, off_t __length));
#endif #endif
#endif #endif
#if defined(__CYGWIN__) || defined(__rtems__) #if defined(__BSD_VISIBLE) || (__XSI_VISIBLE >= 500)
int _EXFUN(getdtablesize, (void)); int _EXFUN(getdtablesize, (void));
int _EXFUN(setdtablesize, (int));
useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
#if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) #if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */ /* winsock[2].h defines as __stdcall, and with int as 2nd arg */
@ -270,6 +269,10 @@ useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
char * _EXFUN(mktemp, (char *)); char * _EXFUN(mktemp, (char *));
#endif #endif
#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(setdtablesize, (int));
#endif
#if defined(__CYGWIN__) || defined(__SPU__) || defined(__rtems__) #if defined(__CYGWIN__) || defined(__SPU__) || defined(__rtems__)
void _EXFUN(sync, (void)); void _EXFUN(sync, (void));
#endif #endif