mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
df9629171c
* sysdeps/generic/seteuid.c (seteuid): Add libc_hidden_def. * sysdeps/generic/setegid.c (setegid): Likewise. * sysdeps/mach/hurd/seteuid.c (seteuid): Likewise. * sysdeps/mach/hurd/setegid.c (setegid): Likewise. * sysdeps/unix/bsd/seteuid.c (seteuid): Likewise. * sysdeps/unix/bsd/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/aix/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/aix/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/setegid.c (setegid): Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise. Remove fallback if __ASSUME_SETRESUID_SYSCALL. * include/sys/stat.h (__fxstat_internal, __fxstat64_internal, __lxstat_internal, __lxstat64_internal): Remove. (__fxstat, __fxstat64, __lxstat, __lxstat64, __xstat, __xstat64): Add hidden_proto. * sysdeps/generic/fxstat.c (__fxstat): Add hidden_def. Remove INTDEF where present, remove #undef at the beginning. * sysdeps/generic/fxstat64.c (__fxstat64): Likewise. * sysdeps/generic/lxstat.c (__lxstat): Likewise. * sysdeps/generic/lxstat64.c (__lxstat64): Likewise. * sysdeps/generic/xstat.c (__xstat): Likewise. * sysdeps/generic/xstat64.c (__xstat64): Likewise. * sysdeps/mach/hurd/dl-sysdep.c (__xstat64, __fxstat64): Likewise. * sysdeps/mach/hurd/fxstat.c (__fxstat): Likewise. * sysdeps/mach/hurd/fxstat64.c (__fxstat64): Likewise. * sysdeps/mach/hurd/lxstat.c (__lxstat): Likewise. * sysdeps/mach/hurd/lxstat64.c (__lxstat64): Likewise. * sysdeps/mach/hurd/xstat.c (__xstat): Likewise. * sysdeps/mach/hurd/xstat64.c (__xstat64): Likewise. * sysdeps/unix/fxstat.c (__fxstat): Likewise. * sysdeps/unix/common/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/aix/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/aix/fxstat64.c (__fxstat64): Likewise. * sysdeps/unix/sysv/aix/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/aix/lxstat64.c (__lxstat64): Likewise. * sysdeps/unix/sysv/aix/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/aix/xstat64.c (__xstat64): Likewise. * sysdeps/unix/sysv/linux/ia64/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/ia64/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/ia64/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/xstat.c (__xstat): Likewise. * sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise. * sysdeps/unix/sysv/linux/fxstat.c (__fxstat): Likewise. * sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Likewise. * sysdeps/unix/sysv/linux/lxstat.c (__lxstat): Likewise. * sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise. * sysdeps/unix/xstat.c (__xstat): Likewise. * include/sys/statvfs.h (statvfs, fstatvfs): Add libc_hidden_proto. * sysdeps/generic/statvfs.c (statvfs): Add libc_hidden_def. * sysdeps/generic/fstatvfs.c (fstatvfs): Likewise. * sysdeps/mach/hurd/statvfs.c (statvfs): Likewise. * sysdeps/mach/hurd/fstatvfs.c (fstatvfs): Likewise. * sysdeps/unix/sysv/linux/statvfs.c (statvfs): Likewise. * sysdeps/unix/sysv/linux/fstatvfs.c (fstatvfs): Likewise. * include/unistd.h (tcgetpgrp): Add libc_hidden_proto. * include/termios.h (tcsetattr, cfsetispeed, cfsetospeed): Likewise. * sysdeps/generic/tcgetpgrp.c (tcgetpgrp): Add libc_hidden_def. * sysdeps/generic/tcsetattr.c (tcsetattr): Likewise. * sysdeps/generic/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/bsd/bsd4.4/tcsetattr.c (tcgetpgrp): Likewise. * sysdeps/unix/bsd/sun/sunos4/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/bsd/sun/sunos4/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/bsd/tcgetpgrp.c (tcgetpgrp): Likewise. * sysdeps/unix/bsd/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/aix/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/aix/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/sysv/linux/tcsetattr.c (tcsetattr): Likewise. * sysdeps/unix/sysv/linux/speed.c (cfsetispeed, cfsetospeed): Likewise. * sysdeps/unix/sysv/tcgetpgrp.c (tcgetpgrp): Likewise. * sysdeps/unix/sysv/tcsetattr.c (tcsetattr): Likewise. * include/string.h (strcoll): Add libc_hidden_proto. * string/strcoll.c (strcoll): Add libc_hidden_def. * misc/err.c (vwarn): Fix pasto in libc_hidden_def.
87 lines
2.4 KiB
C
87 lines
2.4 KiB
C
#ifndef _STRING_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
extern void *__memccpy (void *__dest, __const void *__src,
|
|
int __c, size_t __n);
|
|
|
|
extern size_t __strnlen (__const char *__string, size_t __maxlen)
|
|
__attribute_pure__;
|
|
|
|
extern char *__strsep (char **__stringp, __const char *__delim);
|
|
|
|
extern int __strverscmp (__const char *__s1, __const char *__s2)
|
|
__attribute_pure__;
|
|
|
|
extern int __strncasecmp (__const char *__s1, __const char *__s2,
|
|
size_t __n)
|
|
__attribute_pure__;
|
|
|
|
extern int __strcasecmp (__const char *__s1, __const char *__s2)
|
|
__attribute_pure__;
|
|
|
|
extern char *__strcasestr (__const char *__haystack, __const char *__needle)
|
|
__attribute_pure__;
|
|
|
|
extern char *__strdup (__const char *__string)
|
|
__attribute_malloc__;
|
|
extern char *__strndup (__const char *__string, size_t __n)
|
|
__attribute_malloc__;
|
|
|
|
extern void *__rawmemchr (__const void *__s, int __c)
|
|
__attribute_pure__;
|
|
|
|
extern char *__strchrnul (__const char *__s, int __c)
|
|
__attribute_pure__;
|
|
|
|
extern void *__memrchr (__const void *__s, int __c, size_t __n)
|
|
__attribute_pure__;
|
|
|
|
extern void *__memchr (__const void *__s, int __c, size_t __n)
|
|
__attribute_pure__;
|
|
|
|
extern int __ffs (int __i) __attribute__ ((const));
|
|
|
|
extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
|
|
|
|
/* Now the real definitions. We do this here since some of the functions
|
|
above are defined as macros in the headers. */
|
|
#include <string/string.h>
|
|
|
|
/* Alternative version which doesn't pollute glibc's namespace. */
|
|
#undef strndupa
|
|
#define strndupa(s, n) \
|
|
(__extension__ \
|
|
({ \
|
|
__const char *__old = (s); \
|
|
size_t __len = __strnlen (__old, (n)); \
|
|
char *__new = (char *) __builtin_alloca (__len + 1); \
|
|
__new[__len] = '\0'; \
|
|
(char *) memcpy (__new, __old, __len); \
|
|
}))
|
|
|
|
libc_hidden_proto (__mempcpy)
|
|
libc_hidden_proto (__stpcpy)
|
|
libc_hidden_proto (__stpncpy)
|
|
libc_hidden_proto (__rawmemchr)
|
|
libc_hidden_proto (__strcasecmp)
|
|
libc_hidden_proto (__strcasecmp_l)
|
|
libc_hidden_proto (__strncasecmp_l)
|
|
libc_hidden_proto (__strdup)
|
|
libc_hidden_proto (__strndup)
|
|
libc_hidden_proto (__strerror_r)
|
|
libc_hidden_proto (__strverscmp)
|
|
libc_hidden_proto (basename)
|
|
libc_hidden_proto (strcoll)
|
|
|
|
# ifndef _ISOMAC
|
|
# ifndef index
|
|
# define index(s, c) (strchr ((s), (c)))
|
|
# endif
|
|
# ifndef rindex
|
|
# define rindex(s, c) (strrchr ((s), (c)))
|
|
# endif
|
|
# endif
|
|
|
|
#endif
|