* libc/include/sys/types.h (BSD int typedefs): Guard with _BSDTYPES_DEFINED
rather than _WINSOCK_H. (fd_set): Add !defined __USE_W32_SOCKETS to guard; define _SYS_TYPES_FD_SET. * libc/include/sys/unistd.h (gethostname): Don't declare if defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS).
This commit is contained in:
parent
dac9c6045f
commit
d17d6d4286
|
@ -1,3 +1,12 @@
|
||||||
|
2001-03-20 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
|
* libc/include/sys/types.h (BSD int typedefs): Guard with
|
||||||
|
_BSDTYPES_DEFINED rather than _WINSOCK_H.
|
||||||
|
(fd_set): Add !defined __USE_W32_SOCKETS to guard; define
|
||||||
|
_SYS_TYPES_FD_SET.
|
||||||
|
* libc/include/sys/unistd.h (gethostname): Don't declare if defined
|
||||||
|
(_WINSOCK_H) || defined (__USE_W32_SOCKETS).
|
||||||
|
|
||||||
Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* libc/include/sys/unistd.h: Add _PC_POSIX_PERMISSONS and
|
* libc/include/sys/unistd.h: Add _PC_POSIX_PERMISSONS and
|
||||||
|
|
|
@ -49,11 +49,13 @@
|
||||||
# define physadr physadr_t
|
# define physadr physadr_t
|
||||||
# define quad quad_t
|
# define quad quad_t
|
||||||
|
|
||||||
#ifndef _WINSOCK_H
|
#ifndef _BSDTYPES_DEFINED
|
||||||
|
/* also defined in mingw/gmon.h and in w32api/winsock[2].h */
|
||||||
typedef unsigned char u_char;
|
typedef unsigned char u_char;
|
||||||
typedef unsigned short u_short;
|
typedef unsigned short u_short;
|
||||||
typedef unsigned int u_int;
|
typedef unsigned int u_int;
|
||||||
typedef unsigned long u_long;
|
typedef unsigned long u_long;
|
||||||
|
#define _BSDTYPES_DEFINED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned short ushort; /* System V compatibility */
|
typedef unsigned short ushort; /* System V compatibility */
|
||||||
|
@ -152,12 +154,14 @@ typedef unsigned int mode_t _ST_INT32;
|
||||||
typedef unsigned short nlink_t;
|
typedef unsigned short nlink_t;
|
||||||
|
|
||||||
/* We don't define fd_set and friends if we are compiling POSIX
|
/* We don't define fd_set and friends if we are compiling POSIX
|
||||||
source, or if we have included the Windows Sockets.h header (which
|
source, or if we have included (or may include as indicated
|
||||||
defines Windows versions of them). Note that a program which
|
by __USE_W32_SOCKETS) the W32api winsock[2].h header which
|
||||||
includes the Windows sockets.h header must know what it is doing;
|
defines Windows versions of them. Note that a program which
|
||||||
it must not call the cygwin32 select function. */
|
includes the W32api winsock[2].h header must know what it is doing;
|
||||||
# if ! defined (_POSIX_SOURCE) && ! defined (_WINSOCK_H)
|
it must not call the cygwin32 select function.
|
||||||
|
*/
|
||||||
|
# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
|
||||||
|
# define _SYS_TYPES_FD_SET
|
||||||
# define NBBY 8 /* number of bits in a byte */
|
# define NBBY 8 /* number of bits in a byte */
|
||||||
/*
|
/*
|
||||||
* Select uses bit masks of file descriptors in longs.
|
* Select uses bit masks of file descriptors in longs.
|
||||||
|
@ -193,7 +197,7 @@ typedef struct _types_fd_set {
|
||||||
*__tmp++ = 0; \
|
*__tmp++ = 0; \
|
||||||
}))
|
}))
|
||||||
|
|
||||||
# endif /* ! defined (_POSIX_SOURCE) && ! defined (_WINSOCK_H) */
|
# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) */
|
||||||
|
|
||||||
#undef __MS_types__
|
#undef __MS_types__
|
||||||
#undef _ST_INT32
|
#undef _ST_INT32
|
||||||
|
|
|
@ -115,7 +115,10 @@ int _EXFUN(setdtablesize, (int));
|
||||||
unsigned _EXFUN(usleep, (unsigned int __useconds));
|
unsigned _EXFUN(usleep, (unsigned int __useconds));
|
||||||
int _EXFUN(ftruncate, (int __fd, off_t __length));
|
int _EXFUN(ftruncate, (int __fd, off_t __length));
|
||||||
int _EXFUN(truncate, (const char *, off_t __length));
|
int _EXFUN(truncate, (const char *, off_t __length));
|
||||||
|
#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
|
||||||
|
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
|
||||||
int _EXFUN(gethostname, (char *__name, size_t __len));
|
int _EXFUN(gethostname, (char *__name, size_t __len));
|
||||||
|
#endif
|
||||||
char * _EXFUN(mktemp, (char *));
|
char * _EXFUN(mktemp, (char *));
|
||||||
int _EXFUN(sync, (void));
|
int _EXFUN(sync, (void));
|
||||||
int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
|
int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
|
||||||
|
|
Loading…
Reference in New Issue