aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2022-05-22 15:18:48 -0400
committerKen Brown <kbrown@cornell.edu>2022-05-29 17:45:52 -0400
commit2d9b48760c48f19b2941f05ee6720f510700823c (patch)
tree693f2793b34d8aea8a57d8e0f6202d802eb91097 /newlib/libc/include
parent7c0de0af97d35c8fed5ffbf311e54af85d1c4af3 (diff)
downloadnewlib-2d9b48760c48f19b2941f05ee6720f510700823c.zip
newlib-2d9b48760c48f19b2941f05ee6720f510700823c.tar.gz
newlib-2d9b48760c48f19b2941f05ee6720f510700823c.tar.bz2
Cygwin: simplify some function names
Remove "32" or "64" from each of the following names: acl32, aclcheck32, aclfrommode32, aclfrompbits32, aclfromtext32, aclsort32, acltomode32, acltopbits32, acltotext32, facl32, fchown32, fcntl64, fstat64, _fstat64, _fstat64_r, ftruncate64, getgid32, getgrent32, getgrgid32, getgrnam32, getgroups32, getpwuid32, getpwuid_r32, getuid32, getuid32, initgroups32, lseek64, lstat64, mknod32, mmap64, setegid32, seteuid32, setgid32, setgroups32, setregid32, setreuid32, setuid32, stat64, _stat64_r, truncate64. Remove prototypes and macro definitions of these names. Remove "#ifndef __INSIDE_CYGWIN__" from some headers so that the new names will be available when compiling Cygwin. Remove aliases that are no longer needed. Include <unistd.h> in fhandler_clipboard.cc for the declarations of geteuid and getegid.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r--newlib/libc/include/pwd.h2
-rw-r--r--newlib/libc/include/sys/stat.h2
-rw-r--r--newlib/libc/include/sys/unistd.h16
3 files changed, 3 insertions, 17 deletions
diff --git a/newlib/libc/include/pwd.h b/newlib/libc/include/pwd.h
index baae884..45d1594 100644
--- a/newlib/libc/include/pwd.h
+++ b/newlib/libc/include/pwd.h
@@ -55,10 +55,10 @@ struct passwd {
char *pw_shell; /* default shell */
};
-#ifndef __INSIDE_CYGWIN__
struct passwd *getpwuid (uid_t);
struct passwd *getpwnam (const char *);
+#ifndef __INSIDE_CYGWIN__
#if __MISC_VISIBLE || __POSIX_VISIBLE
int getpwnam_r (const char *, struct passwd *,
char *, size_t , struct passwd **);
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index 6525272..98f5add 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -142,7 +142,7 @@ int mkfifo (const char *__path, mode_t __mode );
int stat (const char *__restrict __path, struct stat *__restrict __sbuf );
mode_t umask (mode_t __mask );
-#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
+#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__)
int lstat (const char *__restrict __path, struct stat *__restrict __buf );
int mknod (const char *__path, mode_t __mode, dev_t __dev );
#endif
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index 3cc3130..216d779 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -21,9 +21,7 @@ int access (const char *__path, int __amode);
unsigned alarm (unsigned __secs);
int chdir (const char *__path);
int chmod (const char *__path, mode_t __mode);
-#if !defined(__INSIDE_CYGWIN__)
int chown (const char *__path, uid_t __owner, gid_t __group);
-#endif
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
int chroot (const char *__path);
#endif
@@ -79,11 +77,9 @@ int fchdir (int __fildes);
#if __POSIX_VISIBLE >= 199309
int fchmod (int __fildes, mode_t __mode);
#endif
-#if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
int fchown (int __fildes, uid_t __owner, gid_t __group);
#endif
-#endif
#if __ATFILE_VISIBLE
int fchownat (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags);
#endif
@@ -106,11 +102,9 @@ int getdomainname (char *__name, size_t __len);
#if __BSD_VISIBLE
int getentropy (void *, size_t);
#endif
-#if !defined(__INSIDE_CYGWIN__)
gid_t getegid (void);
uid_t geteuid (void);
gid_t getgid (void);
-#endif
int getgroups (int __gidsetsize, gid_t __grouplist[]);
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
long gethostid (void);
@@ -135,9 +129,7 @@ pid_t getppid (void);
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
pid_t getsid (pid_t);
#endif
-#if !defined(__INSIDE_CYGWIN__)
uid_t getuid (void);
-#endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
char * getusershell (void);
#endif
@@ -151,11 +143,9 @@ int isatty (int __fildes);
#if __BSD_VISIBLE
int issetugid (void);
#endif
-#if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
int lchown (const char *__path, uid_t __owner, gid_t __group);
#endif
-#endif
int link (const char *__path1, const char *__path2);
#if __ATFILE_VISIBLE
int linkat (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags);
@@ -198,13 +188,11 @@ int ruserok (const char *rhost, int superuser, const char *ruser, const char *lu
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
void * sbrk (ptrdiff_t __incr);
#endif
-#if !defined(__INSIDE_CYGWIN__)
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int setegid (gid_t __gid);
int seteuid (uid_t __uid);
#endif
int setgid (gid_t __gid);
-#endif
#if __BSD_VISIBLE
int setgroups (int ngroups, const gid_t *grouplist);
#endif
@@ -215,14 +203,12 @@ int setpgid (pid_t __pid, pid_t __pgid);
#if __SVID_VISIBLE || __XSI_VISIBLE >= 500
int setpgrp (void);
#endif
-#if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__)
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
int setregid (gid_t __rgid, gid_t __egid);
int setreuid (uid_t __ruid, uid_t __euid);
#endif
pid_t setsid (void);
-#if !defined(__INSIDE_CYGWIN__)
int setuid (uid_t __uid);
-#endif
#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
void setusershell (void);
#endif