Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-09-07 00:55:46 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-09-07 00:55:46 +0400
commit8a8c59b9c20fa9dad2fd212bf9efca3959a8d51f (patch)
treec6daf540511ae3d9ffa192e8c140a2ea9a80ef9b /newlib
parenta385ae75081696ea9d0299cdce50d4261a22fa35 (diff)
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.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/include/sys/types.h7
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) */