diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2000-09-06 20:55:46 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2000-09-06 20:55:46 +0000 |
commit | 8a8c59b9c20fa9dad2fd212bf9efca3959a8d51f (patch) | |
tree | c6daf540511ae3d9ffa192e8c140a2ea9a80ef9b | |
parent | a385ae75081696ea9d0299cdce50d4261a22fa35 (diff) | |
download | cygnal-8a8c59b9c20fa9dad2fd212bf9efca3959a8d51f.tar.gz cygnal-8a8c59b9c20fa9dad2fd212bf9efca3959a8d51f.tar.bz2 cygnal-8a8c59b9c20fa9dad2fd212bf9efca3959a8d51f.zip |
2000-09-06 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/types.h (FD_ZERO): Remove call to bzero and
inline code to prevent having to include another header file.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/include/sys/types.h | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 5bf1caf8a..636154ca5 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2000-09-06 Jeff Johnston <jjohnstn@redhat.com> + + * libc/include/sys/types.h (FD_ZERO): Remove call to bzero and + inline code to prevent having to include another header file. + Wed Sep 6 15:06:40 2000 Christopher Faylor <cgf@cygnus.com> * Makefile.am: Fix space vs. tab problem in install-data-local. diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 7d2e52461..d87a119cd 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -164,7 +164,12 @@ typedef struct _types_fd_set { # define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) # define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) # define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) -# define FD_ZERO(p) bzero((caddr_t)(p), sizeof (*(p))) +# define FD_ZERO(p) (__extension__ (void)({ \ + int i; \ + char *__tmp = (char *)p; \ + for (i = 0; i < sizeof (*(p)); ++i) \ + *__tmp++ = 0; \ +})) # endif /* ! defined (_POSIX_SOURCE) && ! defined (_WINSOCK_H) */ |