mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 06:50:07 +00:00
e6caf4e12e
2002-03-01 Ulrich Drepper <drepper@redhat.com> * elf/Makefile (dl-routines): Add dl-origin. (elide-routines.os): Add dl-origin. * elf/Versions [ld] (GLIBC_PRIVATE): Add _dl_get_origin. * elf/dl-debug.c (_dl_debug_initialize): Add missing INTUSE around _dl_debug_state. * include/libc-symbols.c: Define attribute_hidden depending on HAVE_VISIBILITY_ATTRIBUTE. Add definition of INTVARDEF. * elf/dl-deps.c: Use INTUSE with __libc_enable_secure. * elf/dl-load.c: Likewise. * elf/rtld.c: Likewise. * include/unistd.h: Declare __libc_enable_secure_internal. * sysdeps/generic/dl-sysdep.c: Use INTVARDEF with __libc_enable_secure. Use INTUSE with __libc_enable_secure. * sysdeps/mach/hurd/dl-sysdep.c: Likewise. * elf/dl-deps.c: Use INTUSE with _dl_out_of_memory. * elf/dl-error.c: Likewise, * sysdeps/generic/ldsodefs.h: Declare _dl_out_of_memory_internal. * elf/dl-dst.h [_RTLD_GLOBAL]: Define _dl_get_origin to use INTUSE. * sysdeps/generic/dl-origin.c: Undefine _dl_get_origin macro before function definition. Use INTDEF with _dl_get_origin. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * elf/dl-init.c: Use INTUSE with _dl_starting_up. * elf/rtld.c: Likewise. Use INTVARDEF for _dl_starting_up. * elf/dl-profile.c: Use INTDEF for _dl_mcount. * elf/dl-runtime.c: Use INTUSE with _dl_mcount. * sysdeps/generic/ldsodefs.h: Declare _dl_mcount_internal. * elf/dl-conflict.c: Use rtld_progrname instead of _dl_argv[0]. * elf/dl-deps.c: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc-32/dl-machine.h: Likewise. * sysdeps/sparc/sparc-64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. * elf/rtld.c: Use INTDEF for _dl_argv. Use rtld_progrname instead of _dl_argv[0]. Use INTUSE with _dl_argv. * sysdeps/generic/dl-sysdep.c: Use INTUSE with _dl_argv. * sysdeps/generic/ldsodefs.h: Define rtld_progname macro.
112 lines
4.8 KiB
C
112 lines
4.8 KiB
C
#ifndef _UNISTD_H
|
|
# include <posix/unistd.h>
|
|
|
|
/* Now define the internal interfaces. */
|
|
extern int __access (__const char *__name, int __type);
|
|
extern int __euidaccess (__const char *__name, int __type);
|
|
extern __off64_t __lseek64 (int __fd, __off64_t __offset, int __whence);
|
|
extern __off_t __lseek (int __fd, __off_t __offset, int __whence);
|
|
extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence);
|
|
extern __off64_t __libc_lseek64 (int __fd, __off64_t __offset, int __whence);
|
|
extern ssize_t __pread (int __fd, void *__buf, size_t __nbytes,
|
|
__off_t __offset);
|
|
extern ssize_t __libc_pread (int __fd, void *__buf, size_t __nbytes,
|
|
__off_t __offset);
|
|
extern ssize_t __pread64 (int __fd, void *__buf, size_t __nbytes,
|
|
__off64_t __offset);
|
|
extern ssize_t __libc_pread64 (int __fd, void *__buf, size_t __nbytes,
|
|
__off64_t __offset);
|
|
extern ssize_t __pwrite (int __fd, __const void *__buf, size_t __n,
|
|
__off_t __offset);
|
|
extern ssize_t __libc_pwrite (int __fd, __const void *__buf, size_t __n,
|
|
__off_t __offset);
|
|
extern ssize_t __pwrite64 (int __fd, __const void *__buf, size_t __n,
|
|
__off64_t __offset);
|
|
extern ssize_t __libc_pwrite64 (int __fd, __const void *__buf, size_t __n,
|
|
__off64_t __offset);
|
|
extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
|
|
extern ssize_t __libc_write (int __fd, __const void *__buf, size_t __n);
|
|
extern int __pipe (int __pipedes[2]);
|
|
extern unsigned int __sleep (unsigned int __seconds);
|
|
extern int __chown (__const char *__file,
|
|
__uid_t __owner, __gid_t __group);
|
|
extern int __fchown (int __fd,
|
|
__uid_t __owner, __gid_t __group);
|
|
extern int __lchown (__const char *__file, __uid_t __owner,
|
|
__gid_t __group);
|
|
extern int __chdir (__const char *__path);
|
|
extern int __fchdir (int __fd);
|
|
extern char *__getcwd (char *__buf, size_t __size);
|
|
extern int __rmdir (const char *__path);
|
|
|
|
/* Get the canonical absolute name of the named directory, and put it in SIZE
|
|
bytes of BUF. Returns NULL if the directory couldn't be determined or
|
|
SIZE was too small. If successful, returns BUF. In GNU, if BUF is
|
|
NULL, an array is allocated with `malloc'; the array is SIZE bytes long,
|
|
unless SIZE <= 0, in which case it is as big as necessary. */
|
|
|
|
char *__canonicalize_directory_name_internal (__const char *__thisdir,
|
|
char *__buf,
|
|
size_t __size);
|
|
|
|
extern int __dup (int __fd);
|
|
extern int __dup2 (int __fd, int __fd2);
|
|
extern int __execve (__const char *__path, char *__const __argv[],
|
|
char *__const __envp[]);
|
|
extern long int __pathconf (__const char *__path, int __name);
|
|
extern long int __fpathconf (int __fd, int __name);
|
|
extern long int __sysconf (int __name);
|
|
extern __pid_t __getpid (void);
|
|
extern __pid_t __getppid (void);
|
|
extern __pid_t __setsid (void);
|
|
extern __uid_t __getuid (void);
|
|
extern __uid_t __geteuid (void);
|
|
extern __gid_t __getgid (void);
|
|
extern __gid_t __getegid (void);
|
|
extern int __getgroups (int __size, __gid_t __list[]);
|
|
extern int __group_member (__gid_t __gid);
|
|
extern int __setuid (__uid_t __uid);
|
|
extern int __setreuid (__uid_t __ruid, __uid_t __euid);
|
|
extern int __setgid (__gid_t __gid);
|
|
extern int __setpgid (__pid_t __pid, __pid_t __pgid);
|
|
extern int __setregid (__gid_t __rgid, __gid_t __egid);
|
|
extern __pid_t __vfork (void);
|
|
extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
|
|
extern int __isatty (int __fd);
|
|
extern int __link (__const char *__from, __const char *__to);
|
|
extern int __symlink (__const char *__from, __const char *__to);
|
|
extern int __readlink (__const char *__path, char *__buf, size_t __len);
|
|
extern int __unlink (__const char *__name);
|
|
extern int __gethostname (char *__name, size_t __len);
|
|
extern int __profil (unsigned short int *__sample_buffer, size_t __size,
|
|
size_t __offset, unsigned int __scale);
|
|
extern int __getdtablesize (void);
|
|
extern int __brk (void *__addr);
|
|
extern int __close (int __fd);
|
|
extern ssize_t __read (int __fd, void *__buf, size_t __nbytes);
|
|
extern ssize_t __write (int __fd, __const void *__buf, size_t __n);
|
|
extern __pid_t __fork (void);
|
|
extern int __getpagesize (void) __attribute__ ((__const__));
|
|
extern int __ftruncate (int __fd, __off_t __length);
|
|
extern int __ftruncate64 (int __fd, __off64_t __length);
|
|
extern void *__sbrk (intptr_t __delta);
|
|
|
|
|
|
/* This variable is set nonzero at startup if the process's effective
|
|
IDs differ from its real IDs, or it is otherwise indicated that
|
|
extra security should be used. When this is set the dynamic linker
|
|
and some functions contained in the C library ignore various
|
|
environment variables that normally affect them. */
|
|
extern int __libc_enable_secure;
|
|
#ifdef _RTLD_LOCAL
|
|
/* XXX The #ifdef should go. */
|
|
extern int __libc_enable_secure_internal attribute_hidden;
|
|
#endif
|
|
|
|
|
|
/* Various internal function. */
|
|
extern void __libc_check_standard_fds (void);
|
|
|
|
|
|
#endif
|