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
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/libc')
-rw-r--r--winsup/cygwin/libc/fts.c9
-rw-r--r--winsup/cygwin/libc/minires.c4
-rw-r--r--winsup/cygwin/libc/rcmd.cc13
-rw-r--r--winsup/cygwin/libc/rexec.cc4
4 files changed, 10 insertions, 20 deletions
diff --git a/winsup/cygwin/libc/fts.c b/winsup/cygwin/libc/fts.c
index 003f85146..1826d2213 100644
--- a/winsup/cygwin/libc/fts.c
+++ b/winsup/cygwin/libc/fts.c
@@ -58,17 +58,8 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/fts.c,v 1.39 2013/02/11 02:00:16 svnexp Exp
#define _open open
#define _close close
#define _dirfd dirfd
-#ifdef __x86_64__
#define _fstat fstat
#else
-extern int stat64 (const char *path, struct stat *buf);
-extern int fstat64 (int fd, struct stat *buf);
-extern int lstat64 (const char *path, struct stat *buf);
-#define stat(a,b) stat64((a),(b))
-#define _fstat(a,b) fstat64((a),(b))
-#define lstat(a,b) lstat64((a),(b))
-#endif
-#else
#include "un-namespace.h"
#include "gen-private.h"
diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c
index b540f6a1b..5b43b3e68 100644
--- a/winsup/cygwin/libc/minires.c
+++ b/winsup/cygwin/libc/minires.c
@@ -237,12 +237,12 @@ static int open_sock(struct sockaddr_in *CliAddr, int debug)
return -1;
}
/* Set non-blocking */
- if (fcntl64(fd, F_SETFL, O_NONBLOCK) < 0) {
+ if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
DPRINTF(debug, "fcntl: %s\n", strerror(errno));
return -1;
}
/* Set close on exec flag */
- if (fcntl64(fd, F_SETFD, 1) == -1) {
+ if (fcntl(fd, F_SETFD, 1) == -1) {
DPRINTF(debug, "fcntl: %s\n", strerror(errno));
return -1;
}
diff --git a/winsup/cygwin/libc/rcmd.cc b/winsup/cygwin/libc/rcmd.cc
index 6d087d777..e606e73cf 100644
--- a/winsup/cygwin/libc/rcmd.cc
+++ b/winsup/cygwin/libc/rcmd.cc
@@ -103,7 +103,6 @@ extern "C" {
int cygwin_rresvport_af(int *alport, int family);
int cygwin_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
int cygwin_socket (int, int, int);
- int seteuid32 (uid_t);
}
#endif
@@ -200,7 +199,7 @@ cygwin_rcmd_af(char **ahost, in_port_t rport, const char *locuser,
NULL);
return (-1);
}
- fcntl64(s, F_SETOWN, pid);
+ fcntl(s, F_SETOWN, pid);
if (cygwin_connect(s, ai->ai_addr, ai->ai_addrlen) >= 0)
break;
(void)close(s);
@@ -458,10 +457,10 @@ again:
* reading an NFS mounted file system, can't read files that
* are protected read/write owner only.
*/
- uid = geteuid32();
- (void)seteuid32(pwd->pw_uid);
+ uid = geteuid();
+ (void)seteuid(pwd->pw_uid);
hostf = fopen(pbuf, "rt");
- (void)seteuid32(uid);
+ (void)seteuid(uid);
if (hostf == NULL)
return (-1);
@@ -470,11 +469,11 @@ again:
* user or root or if writeable by anyone but the owner, quit.
*/
cp = NULL;
- if (lstat64(pbuf, &sbuf) < 0)
+ if (lstat(pbuf, &sbuf) < 0)
cp = ".rhosts lstat failed";
else if (!S_ISREG(sbuf.st_mode))
cp = ".rhosts not regular file";
- else if (fstat64(fileno(hostf), &sbuf) < 0)
+ else if (fstat(fileno(hostf), &sbuf) < 0)
cp = ".rhosts fstat failed";
else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
cp = "bad .rhosts owner";
diff --git a/winsup/cygwin/libc/rexec.cc b/winsup/cygwin/libc/rexec.cc
index 7f25123a0..7e337f1e2 100644
--- a/winsup/cygwin/libc/rexec.cc
+++ b/winsup/cygwin/libc/rexec.cc
@@ -215,7 +215,7 @@ next:
break;
case PASSWD:
if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
- fstat64(fileno(cfile), &stb) >= 0 &&
+ fstat(fileno(cfile), &stb) >= 0 &&
(stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
warnx("Remove password or make file unreadable by others.");
@@ -227,7 +227,7 @@ next:
}
break;
case ACCOUNT:
- if (fstat64(fileno(cfile), &stb) >= 0
+ if (fstat(fileno(cfile), &stb) >= 0
&& (stb.st_mode & 077) != 0) {
warnx("Error: .netrc file is readable by others.");
warnx("Remove account or make file unreadable by others.");