diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-12-20 09:29:29 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-12-20 09:29:29 +0100 |
commit | a65dd355fb80a05215e15ae97649de52aec885e3 (patch) | |
tree | 81701bb0c6b648630f2bf1729a85d7f5eb49e67b /misc | |
parent | 296a5732f94abe4d5699dc981e4ccfb950b48cee (diff) | |
parent | b4578bab30f72cddd2cf38abfb39f9c8dc892249 (diff) |
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'misc')
-rw-r--r-- | misc/Makefile | 3 | ||||
-rw-r--r-- | misc/error.c | 2 | ||||
-rw-r--r-- | misc/getauxval.c | 3 | ||||
-rw-r--r-- | misc/swapon.c | 3 | ||||
-rw-r--r-- | misc/sys/auxv.h | 4 |
5 files changed, 8 insertions, 7 deletions
diff --git a/misc/Makefile b/misc/Makefile index 4b52669dde..3d6760b42b 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -72,7 +72,7 @@ generated := tst-error1.mtrace tst-error1-mem include ../Makeconfig aux := init-misc -install-lib := libbsd-compat.a libg.a +install-lib := libg.a gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ @@ -104,7 +104,6 @@ tests-static += tst-sbrk-static include ../Rules -$(objpfx)libbsd-compat.a: $(dep-dummy-lib); $(make-dummy-lib) $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib) ifeq ($(build-shared),yes) diff --git a/misc/error.c b/misc/error.c index c8e62cf9b4..408a1ab25e 100644 --- a/misc/error.c +++ b/misc/error.c @@ -165,7 +165,7 @@ error_tail (int status, int errnum, const char *message, va_list args) if (res != len) break; - if (__builtin_expect (len >= SIZE_MAX / 2, 0)) + if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0)) { /* This really should not happen if everything is fine. */ res = (size_t) -1; diff --git a/misc/getauxval.c b/misc/getauxval.c index e0317fd6f9..dd4c8ecab3 100644 --- a/misc/getauxval.c +++ b/misc/getauxval.c @@ -16,6 +16,7 @@ <http://www.gnu.org/licenses/>. */ #include <sys/auxv.h> +#include <errno.h> #include <ldsodefs.h> @@ -32,6 +33,8 @@ __getauxval (unsigned long int type) for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++) if (p->a_type == type) return p->a_un.a_val; + + __set_errno (ENOENT); return 0; } diff --git a/misc/swapon.c b/misc/swapon.c index 61933b8bb5..0e587d473f 100644 --- a/misc/swapon.c +++ b/misc/swapon.c @@ -22,8 +22,7 @@ /* Make the block special device PATH available to the system for swapping. This call is restricted to the super-user. */ int -swapon (path) - const char *path; +swapon (const char *path, int flags) { __set_errno (ENOSYS); return -1; diff --git a/misc/sys/auxv.h b/misc/sys/auxv.h index a69250bd52..7aec3a04b8 100644 --- a/misc/sys/auxv.h +++ b/misc/sys/auxv.h @@ -27,9 +27,9 @@ __BEGIN_DECLS /* Return the value associated with an Elf*_auxv_t type from the auxv list passed to the program on startup. If TYPE was not present in the auxv - list, returns zero. */ + list, returns zero and sets errno to ENOENT. */ extern unsigned long int getauxval (unsigned long int __type) - __THROW __attribute_const__; + __THROW; __END_DECLS |