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:
authorJeff Johnston <jjohnstn@redhat.com>2002-07-25 21:59:48 +0400
committerJeff Johnston <jjohnstn@redhat.com>2002-07-25 21:59:48 +0400
commit3d966a92d36173a2d852f72199705a811e9cb17b (patch)
tree8b04f82e94ae1a847e6bf40a5cfed200d94c92fc /newlib/libc/sys
parent68fb3cca6427132e70f465305e67b5131f8f9120 (diff)
2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/config.h (__set_errno): Macro definition removed. * libc/sys/linux/fpathconf.c (__set_errno): Ditto. * libc/sys/linux/libc-internal.h (__set_errno): Ditto. * libc/sys/linux/pathconf.c (__set_errno): Ditto. * libc/sys/linux/ttyname_r.c (__set_errno): Ditto. * libc/sys/linux/sys/errno.h (__set_errno): Macro definition added.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/linux/config.h2
-rw-r--r--newlib/libc/sys/linux/fpathconf.c2
-rw-r--r--newlib/libc/sys/linux/libc-internal.h3
-rw-r--r--newlib/libc/sys/linux/pathconf.c2
-rw-r--r--newlib/libc/sys/linux/sys/errno.h2
-rw-r--r--newlib/libc/sys/linux/ttyname_r.c2
6 files changed, 2 insertions, 11 deletions
diff --git a/newlib/libc/sys/linux/config.h b/newlib/libc/sys/linux/config.h
index 579543aca..76b438c85 100644
--- a/newlib/libc/sys/linux/config.h
+++ b/newlib/libc/sys/linux/config.h
@@ -13,6 +13,4 @@
#define UINT32_C(c) c ## U
-#define __set_errno(x) (errno = (x))
-
#include <machine/sysdep.h>
diff --git a/newlib/libc/sys/linux/fpathconf.c b/newlib/libc/sys/linux/fpathconf.c
index 63b95f907..dc7aaec57 100644
--- a/newlib/libc/sys/linux/fpathconf.c
+++ b/newlib/libc/sys/linux/fpathconf.c
@@ -29,8 +29,6 @@
#include <machine/weakalias.h>
#include "linux_fsinfo.h"
-#define __set_errno(x) errno=(x)
-
/* The Linux kernel header mentioned this as a kind of generic value. */
#define LINUX_LINK_MAX 127
diff --git a/newlib/libc/sys/linux/libc-internal.h b/newlib/libc/sys/linux/libc-internal.h
index a443ced18..8369ffec2 100644
--- a/newlib/libc/sys/linux/libc-internal.h
+++ b/newlib/libc/sys/linux/libc-internal.h
@@ -6,9 +6,6 @@
#include <hp-timing.h>
-/* macro to set errno */
-#define __set_errno(x) (errno = (x))
-
/* Initialize the `__libc_enable_secure' flag. */
extern void __libc_init_secure (void);
diff --git a/newlib/libc/sys/linux/pathconf.c b/newlib/libc/sys/linux/pathconf.c
index 6ce77d392..bbdb6180f 100644
--- a/newlib/libc/sys/linux/pathconf.c
+++ b/newlib/libc/sys/linux/pathconf.c
@@ -30,8 +30,6 @@
#include <machine/weakalias.h>
#include "linux_fsinfo.h"
-#define __set_errno(x) errno=(x)
-
/* The Linux kernel header mentioned this as a kind of generic value. */
#define LINUX_LINK_MAX 127
diff --git a/newlib/libc/sys/linux/sys/errno.h b/newlib/libc/sys/linux/sys/errno.h
index b4b0f1614..aaf9d3624 100644
--- a/newlib/libc/sys/linux/sys/errno.h
+++ b/newlib/libc/sys/linux/sys/errno.h
@@ -23,6 +23,8 @@ extern __IMPORT int _sys_nerr;
/* --- end of slight redundancy (the use of struct _reent->_errno is
hard-coded in perror.c so why pretend anything else could work too ? */
+#define __set_errno(x) (errno = (x))
+
#include <asm/errno.h>
#define ENOTSUP EOPNOTSUPP
diff --git a/newlib/libc/sys/linux/ttyname_r.c b/newlib/libc/sys/linux/ttyname_r.c
index a0cc90199..efad76a0e 100644
--- a/newlib/libc/sys/linux/ttyname_r.c
+++ b/newlib/libc/sys/linux/ttyname_r.c
@@ -34,8 +34,6 @@ static int getttyname_r (char *buf, size_t buflen,
extern struct dirent64 *__readdir64 (DIR *);
-#define __set_errno(x) (errno = (x))
-
static int
getttyname_r (char *buf, size_t buflen, dev_t mydev, ino64_t myino,
int save, int *dostat)