Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140099519
D46780.id143693.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D46780.id143693.diff
View Options
diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map
--- a/lib/libsys/Symbol.sys.map
+++ b/lib/libsys/Symbol.sys.map
@@ -72,7 +72,6 @@
extattr_set_file;
extattr_set_link;
extattrctl;
- errno;
fchdir;
fchflags;
fchmod;
@@ -384,6 +383,7 @@
FBSDprivate_1.0 {
/* Add entries in sort(1) order */
+ __errno;
__set_error_selector;
__sigwait;
gssd_syscall;
diff --git a/lib/libsys/__error.c b/lib/libsys/__error.c
--- a/lib/libsys/__error.c
+++ b/lib/libsys/__error.c
@@ -31,13 +31,13 @@
#include "libc_private.h"
-int errno;
+int __errno;
+__sym_compat(errno, __errno, FBSD_1.0);
static int *
__error_unthreaded(void)
{
-
- return (&errno);
+ return (&__errno);
}
static int *(*__error_selector)(void) = __error_unthreaded;
@@ -45,13 +45,11 @@
void
__set_error_selector(int *(*arg)(void))
{
-
__error_selector = arg;
}
int *
__error(void)
{
-
return (__error_selector());
}
diff --git a/lib/libthr/sys/thr_error.c b/lib/libthr/sys/thr_error.c
--- a/lib/libthr/sys/thr_error.c
+++ b/lib/libthr/sys/thr_error.c
@@ -39,8 +39,7 @@
#include "libc_private.h"
#include "thr_private.h"
-#undef errno
-extern int errno;
+extern int __errno;
__weak_reference(__error_threaded, __error);
int *
@@ -53,5 +52,5 @@
if (curthread != NULL && curthread != _thr_initial)
return (&curthread->error);
}
- return (&errno);
+ return (&__errno);
}
diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c
--- a/lib/libthr/thread/thr_rtld.c
+++ b/lib/libthr/thread/thr_rtld.c
@@ -39,8 +39,7 @@
#include "rtld_lock.h"
#include "thr_private.h"
-#undef errno
-extern int errno;
+extern int __errno;
static int _thr_rtld_clr_flag(int);
static void *_thr_rtld_lock_create(void);
@@ -96,14 +95,14 @@
if (curthread != _thr_initial) \
errsave = curthread->error; \
else \
- errsave = errno; \
+ errsave = __errno; \
}
#define RESTORE_ERRNO() { \
if (curthread != _thr_initial) \
curthread->error = errsave; \
else \
- errno = errsave; \
+ __errno = errsave; \
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 5:27 AM (11 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27108033
Default Alt Text
D46780.id143693.diff (2 KB)
Attached To
Mode
D46780: lib{c,sys}: stop exposing errno symbol
Attached
Detach File
Event Timeline
Log In to Comment