diff options
Diffstat (limited to 'sysdeps/i386/bits')
-rw-r--r-- | sysdeps/i386/bits/select.h | 3 | ||||
-rw-r--r-- | sysdeps/i386/bits/string.h | 14 |
2 files changed, 12 insertions, 5 deletions
diff --git a/sysdeps/i386/bits/select.h b/sysdeps/i386/bits/select.h index edcb562..34d2b0b 100644 --- a/sysdeps/i386/bits/select.h +++ b/sysdeps/i386/bits/select.h @@ -58,8 +58,9 @@ # define __FD_ZERO(set) \ do { \ unsigned int __i; \ + __fd_mask *__arr = (set); \ for (__i = 0; __i < sizeof (__fd_set) / sizeof (__fd_mask); ++__i) \ - ((__fd_mask *) set)[__i] = 0; \ + __arr->fds_bits[__i] = 0; \ } while (0) # define __FD_SET(d, set) ((set)->fds_bits[__FDELT (d)] |= __FDMASK (d)) # define __FD_CLR(d, set) ((set)->fds_bits[__FDELT (d)] &= ~__FDMASK (d)) diff --git a/sysdeps/i386/bits/string.h b/sysdeps/i386/bits/string.h index 2931684..c6deb2b 100644 --- a/sysdeps/i386/bits/string.h +++ b/sysdeps/i386/bits/string.h @@ -18,11 +18,17 @@ Boston, MA 02111-1307, USA. */ #ifndef _STRING_H -#error "Never use <bits/string.h> directly; include <string.h> instead." +# error "Never use <bits/string.h> directly; include <string.h> instead." #endif -/* We only provide optimizations for the GNU CC. */ -#if defined __GNUC__ && __GNUC__ >= 2 +/* The ix86 processors can access unaligned multi-byte variables. */ +#define _STRING_ARCH_unaligned 1 + + +/* We only provide optimizations if the user selects them and if + GNU CC is used. */ +#if !defined __NO_STRING_INLINES && defined __USE_STRING_INLINES \ + && defined __GNUC__ && __GNUC__ >= 2 #ifdef __cplusplus # define __STRING_INLINE inline @@ -741,4 +747,4 @@ strstr (__const char *__haystack, __const char *__needle) #undef __STRING_INLINE -#endif /* GNU CC */ +#endif /* use string inlines && GNU CC */ |