diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-11-14 00:35:10 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-11-14 00:35:10 +0400 |
commit | be7035d9f65448323ab689980e7ea6ef36bfa5d0 (patch) | |
tree | ed41326b7f86f850a1a8892841ee259cae6e71d8 /libc/debian/patches | |
parent | f6f5aa8b5ffc820a5e722025bd88bcfec23e6800 (diff) | |
download | illumos-packaging-be7035d9f65448323ab689980e7ea6ef36bfa5d0.tar.gz |
More patches
* Added libelf-no-clobber-warning.patch
* Added use-posix-functions.patch
Diffstat (limited to 'libc/debian/patches')
-rw-r--r-- | libc/debian/patches/libelf-no-clobber-warning.patch | 17 | ||||
-rw-r--r-- | libc/debian/patches/series | 2 | ||||
-rw-r--r-- | libc/debian/patches/use-posix-functions.patch | 453 |
3 files changed, 472 insertions, 0 deletions
diff --git a/libc/debian/patches/libelf-no-clobber-warning.patch b/libc/debian/patches/libelf-no-clobber-warning.patch new file mode 100644 index 0000000..edc8764 --- /dev/null +++ b/libc/debian/patches/libelf-no-clobber-warning.patch @@ -0,0 +1,17 @@ +Description: disable warnning +../misc/demangle.c: In function 'elf_demangle': +../misc/demangle.c:123:15: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] + register int i = 0; + +Index: libc/usr/src/cmd/sgs/libelf/Makefile.com +=================================================================== +--- libc.orig/usr/src/cmd/sgs/libelf/Makefile.com ++++ libc/usr/src/cmd/sgs/libelf/Makefile.com +@@ -70,6 +70,7 @@ LINTFLAGS64 += -u -erroff=E_CAST_INT_TO_ + + CERRWARN += -_gcc=-Wno-parentheses + CERRWARN += -_gcc=-Wno-uninitialized ++CERRWARN += -_gcc=-Wno-clobbered + + BUILD.AR= $(RM) $@ ; \ + $(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)` ; \ diff --git a/libc/debian/patches/series b/libc/debian/patches/series index 13ae530..e2d43ff 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -106,3 +106,5 @@ libc-pipe.patch libc-accept.patch libnsl-illumos-updates.patch libc-malloc_usable_size.patch +libelf-no-clobber-warning.patch +use-posix-functions.patch diff --git a/libc/debian/patches/use-posix-functions.patch b/libc/debian/patches/use-posix-functions.patch new file mode 100644 index 0000000..5cbe6ed --- /dev/null +++ b/libc/debian/patches/use-posix-functions.patch @@ -0,0 +1,453 @@ +Description: Use POSIX by default +Index: libc/usr/src/head/pwd.h +=================================================================== +--- libc.orig/usr/src/head/pwd.h ++++ libc/usr/src/head/pwd.h +@@ -143,12 +143,7 @@ extern void setpwent(); + * only. New applications/libraries should use the standard definitions. + */ + +-#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ +- defined(_POSIX_PTHREAD_SEMANTICS) || defined(__EXTENSIONS__) +- +-#if defined(__STDC__) +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) ++#ifndef __USE_LEGACY_GETPW_R + + #ifdef __PRAGMA_REDEFINE_EXTNAME + #pragma redefine_extname getpwuid_r __posix_getpwuid_r +@@ -163,13 +158,6 @@ extern int __posix_getpwuid_r(uid_t, str + extern int __posix_getpwnam_r(const char *, struct passwd *, char *, + size_t, struct passwd **); + +-#ifdef __lint +- +-#define getpwuid_r __posix_getpwuid_r +-#define getpwnam_r __posix_getpwnam_r +- +-#else /* !__lint */ +- + static int + getpwuid_r(uid_t __uid, struct passwd *__pwd, char *__buf, int __len, + struct passwd **__res) +@@ -183,71 +171,16 @@ getpwnam_r(const char *__cb, struct pass + return (__posix_getpwnam_r(__cb, __pwd, __buf, __len, __res)); + } + +-#endif /* !__lint */ + #endif /* __PRAGMA_REDEFINE_EXTNAME */ + +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ ++#else /* __USE_LEGACY_GETPW_R */ + + extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int); + extern struct passwd *getpwnam_r(const char *, struct passwd *, char *, int); + +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-#else /* __STDC__ */ +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) +- +-#ifdef __PRAGMA_REDEFINE_EXTNAME +-#pragma redefine_extname getpwuid_r __posix_getpwuid_r +-#pragma redefine_extname getpwnam_r __posix_getpwnam_r +-extern int getpwuid_r(); +-extern int getpwnam_r(); +-#else /* __PRAGMA_REDEFINE_EXTNAME */ +- +-extern int __posix_getpwuid_r(); +-extern int __posix_getpwnam_r(); +- +-#ifdef __lint +- +-#define getpwuid_r __posix_getpwuid_r +-#define getpwnam_r __posix_getpwnam_r +- +-#else /* !__lint */ +- +-static int +-getpwuid_r(__uid, __pwd, __buf, __len, __res) +- uid_t __uid; +- struct passwd *__pwd; +- char *__buf; +- int __len; +- struct passwd **__res; +-{ +- return (__posix_getpwuid_r(__uid, __pwd, __buf, __len, __res)); +-} +-static int +-getpwnam_r(__cb, __pwd, __buf, __len, __res) +- char *__cb; +- struct passwd *__pwd; +- char *__buf; +- int __len; +- struct passwd **__res; +-{ +- return (__posix_getpwnam_r(__cb, __pwd, __buf, __len, __res)); +-} +- +-#endif /* !__lint */ +-#endif /* __PRAGMA_REDEFINE_EXTNAME */ +- +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-extern struct passwd *getpwuid_r(); +-extern struct passwd *getpwnam_r(); +- +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ + +-#endif /* __STDC__ */ + +-#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L)... */ ++#endif /* __USE_LEGACY_GETPW_R */ + + #ifdef __cplusplus + } +Index: libc/usr/src/lib/libc/port/gen/getpwnam.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/getpwnam.c ++++ libc/usr/src/lib/libc/port/gen/getpwnam.c +@@ -32,6 +32,8 @@ + #pragma weak _getpwnam = getpwnam + #pragma weak _getpwuid = getpwuid + ++#define __USE_LEGACY_GETPW_R ++ + #include "lint.h" + #include <sys/types.h> + #include <pwd.h> +Index: libc/usr/src/lib/libc/port/gen/getpwnam_r.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/getpwnam_r.c ++++ libc/usr/src/lib/libc/port/gen/getpwnam_r.c +@@ -24,6 +24,8 @@ + * Use is subject to license terms. + */ + ++#define __USE_LEGACY_GETPW_R ++ + #include "lint.h" + #include <sys/types.h> + #include <pwd.h> +Index: libc/usr/src/head/grp.h +=================================================================== +--- libc.orig/usr/src/head/grp.h ++++ libc/usr/src/head/grp.h +@@ -134,12 +134,8 @@ extern struct group *getgrent(); /* MT- + * only. New applications/libraries should use the standard definitions. + */ + +-#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ +- (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) + +-#if defined(__STDC__) +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) ++#ifndef __USE_LEGACY_GETGR_R + + #ifdef __PRAGMA_REDEFINE_EXTNAME + #pragma redefine_extname getgrgid_r __posix_getgrgid_r +@@ -154,13 +150,6 @@ extern int __posix_getgrgid_r(gid_t, str + extern int __posix_getgrnam_r(const char *, struct group *, char *, size_t, + struct group **); + +-#ifdef __lint +- +-#define getgrgid_r __posix_getgrgid_r +-#define getgrnam_r __posix_getgrnam_r +- +-#else /* !__lint */ +- + static int + getgrgid_r(gid_t __gid, struct group *__grp, char *__buf, int __len, + struct group **__res) +@@ -174,71 +163,14 @@ getgrnam_r(const char *__cb, struct grou + return (__posix_getgrnam_r(__cb, __grp, __buf, __len, __res)); + } + +-#endif /* !__lint */ + #endif /* __PRAGMA_REDEFINE_EXTNAME */ + +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ ++#else /* __USE_LEGACY_GETGR_R */ + + extern struct group *getgrgid_r(gid_t, struct group *, char *, int); + extern struct group *getgrnam_r(const char *, struct group *, char *, int); + +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-#else /* __STDC__ */ +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) +- +-#ifdef __PRAGMA_REDEFINE_EXTNAME +-#pragma redefine_extname getgrgid_r __posix_getgrgid_r +-#pragma redefine_extname getgrnam_r __posix_getgrnam_r +-extern int getgrgid_r(); +-extern int getgrnam_r(); +-#else /* __PRAGMA_REDEFINE_EXTNAME */ +- +-extern int __posix_getgrgid_r(); +-extern int __posix_getgrnam_r(); +- +-#ifdef __lint +- +-#define getgrgid_r __posix_getgrgid_r +-#define getgrnam_r __posix_getgrnam_r +- +-#else /* !__lint */ +- +-static int +-getgrgid_r(__gid, __grp, __buf, __len, __res) +- gid_t __gid; +- struct group *__grp; +- char *__buf; +- int __len; +- struct group **__res; +-{ +- return (__posix_getgrgid_r(__gid, __grp, __buf, __len, __res)); +-} +-static int +-getgrnam_r(__cb, __grp, __buf, __len, __res) +- char *__cb; +- struct group *__grp; +- char *__buf; +- int __len; +- struct group **__res; +-{ +- return (__posix_getgrnam_r(__cb, __grp, __buf, __len, __res)); +-} +- +-#endif /* !__lint */ +-#endif /* __PRAGMA_REDEFINE_EXTNAME */ +- +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-extern struct group *getgrgid_r(); +-extern struct group *getgrnam_r(); +- +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-#endif /* __STDC__ */ +- +-#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ ++#endif /* __USE_LEGACY_GETGR_R */ + + #ifdef __cplusplus + } +Index: libc/usr/src/lib/libc/port/stdio/cuserid.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/stdio/cuserid.c ++++ libc/usr/src/lib/libc/port/stdio/cuserid.c +@@ -31,6 +31,8 @@ + + #pragma weak _cuserid = cuserid + ++#define __USE_LEGACY_GETPW_R ++ + #include "lint.h" + #include <stdio.h> + #include <pwd.h> +Index: libc/usr/src/lib/libc/port/gen/getgrnam.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/getgrnam.c ++++ libc/usr/src/lib/libc/port/gen/getgrnam.c +@@ -32,6 +32,8 @@ + #pragma weak _getgrnam = getgrnam + #pragma weak _getgrgid = getgrgid + ++#define __USE_LEGACY_GETGR_R ++ + #include "lint.h" + #include <sys/types.h> + #include <grp.h> +Index: libc/usr/src/lib/libc/port/gen/getgrnam_r.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/gen/getgrnam_r.c ++++ libc/usr/src/lib/libc/port/gen/getgrnam_r.c +@@ -24,6 +24,8 @@ + * Use is subject to license terms. + */ + ++#define __USE_LEGACY_GETGR_R ++ + #include "lint.h" + #include <mtlib.h> + #include <sys/types.h> +Index: libc/usr/src/lib/libnsl/rpc/netnamer.c +=================================================================== +--- libc.orig/usr/src/lib/libnsl/rpc/netnamer.c ++++ libc/usr/src/lib/libnsl/rpc/netnamer.c +@@ -49,6 +49,8 @@ + */ + + #undef NIS ++#define __USE_LEGACY_GETGR_R ++#define __USE_LEGACY_GETPW_R + #include "mt.h" + #include "rpc_mt.h" + #include <stdio.h> +Index: libc/usr/src/lib/libsecdb/common/getexecattr.c +=================================================================== +--- libc.orig/usr/src/lib/libsecdb/common/getexecattr.c ++++ libc/usr/src/lib/libsecdb/common/getexecattr.c +@@ -22,6 +22,8 @@ + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + */ + ++#define __USE_LEGACY_GETPW_R ++ + #include <sys/types.h> + #include <stdio.h> + #include <string.h> +Index: libc/usr/src/lib/libsecdb/common/chkauthattr.c +=================================================================== +--- libc.orig/usr/src/lib/libsecdb/common/chkauthattr.c ++++ libc/usr/src/lib/libsecdb/common/chkauthattr.c +@@ -22,6 +22,8 @@ + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + */ + ++#define __USE_LEGACY_GETPW_R ++ + #include <alloca.h> + #include <stdio.h> + #include <stdlib.h> +Index: libc/usr/src/lib/libsecdb/common/getuserattr.c +=================================================================== +--- libc.orig/usr/src/lib/libsecdb/common/getuserattr.c ++++ libc/usr/src/lib/libsecdb/common/getuserattr.c +@@ -25,6 +25,8 @@ + + #pragma ident "%Z%%M% %I% %E% SMI" + ++#define __USE_LEGACY_GETPW_R ++ + #include <sys/types.h> + #include <sys/mman.h> + #include <stdio.h> +Index: libc/usr/src/head/signal.h +=================================================================== +--- libc.orig/usr/src/head/signal.h ++++ libc/usr/src/head/signal.h +@@ -213,13 +213,8 @@ extern int sigqueue(); + * sigwait() prototype is defined here. + */ + +-#if defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && \ +- !defined(__XOPEN_OR_POSIX)) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ +- defined(_POSIX_PTHREAD_SEMANTICS) + +-#if defined(__STDC__) +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) ++#ifndef __USE_LEGACY_SIGWAIT + + #ifdef __PRAGMA_REDEFINE_EXTNAME + #pragma redefine_extname sigwait __posix_sigwait +@@ -229,62 +224,19 @@ extern int sigwait(const sigset_t *_REST + extern int __posix_sigwait(const sigset_t *_RESTRICT_KYWD, + int *_RESTRICT_KYWD); + +-#ifdef __lint +-#define sigwait __posix_sigwait +-#else /* !__lint */ +- + static int + sigwait(const sigset_t *_RESTRICT_KYWD __setp, int *_RESTRICT_KYWD __signo) + { + return (__posix_sigwait(__setp, __signo)); + } + +-#endif /* !__lint */ + #endif /* __PRAGMA_REDEFINE_EXTNAME */ + +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ ++#else /* __USE_LEGACY_SIGWAIT */ + + extern int sigwait(sigset_t *); + +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +- +-#else /* __STDC__ */ +- +- +-#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) +- +-#ifdef __PRAGMA_REDEFINE_EXTNAME +-#pragma redefine_extname sigwait __posix_sigwait +-extern int sigwait(); +-#else /* __PRAGMA_REDEFINE_EXTNAME */ +- +-extern int __posix_sigwait(); +- +-#ifdef __lint +-#define sigwait __posix_sigwait +-#else /* !__lint */ +- +-static int +-sigwait(__setp, __signo) +- sigset_t *__setp; +- int *__signo; +-{ +- return (__posix_sigwait(__setp, __signo)); +-} +- +-#endif /* !__lint */ +-#endif /* __PRAGMA_REDEFINE_EXTNAME */ +- +-#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-extern int sigwait(); +- +-#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ +- +-#endif /* __STDC__ */ +- +-#endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */ ++#endif /* __USE_LEGACY_SIGWAIT */ + + #ifdef __cplusplus + } +Index: libc/usr/src/lib/nsswitch/nis/common/getgrent.c +=================================================================== +--- libc.orig/usr/src/lib/nsswitch/nis/common/getgrent.c ++++ libc/usr/src/lib/nsswitch/nis/common/getgrent.c +@@ -27,6 +27,8 @@ + * nis/getgrent.c -- "nis" backend for nsswitch "group" database + */ + ++#define __USE_LEGACY_GETPW_R ++ + #include <grp.h> + #include <pwd.h> + #include "nis_common.h" +Index: libc/usr/src/lib/libc/port/sys/posix_sigwait.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/sys/posix_sigwait.c ++++ libc/usr/src/lib/libc/port/sys/posix_sigwait.c +@@ -26,6 +26,8 @@ + + #pragma ident "%Z%%M% %I% %E% SMI" + ++#define __USE_LEGACY_SIGWAIT ++ + #include "lint.h" + #include <sys/types.h> + #include <errno.h> +Index: libc/usr/src/lib/libc/port/threads/scalls.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/threads/scalls.c ++++ libc/usr/src/lib/libc/port/threads/scalls.c +@@ -26,6 +26,8 @@ + + /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */ + ++#define __USE_LEGACY_SIGWAIT ++ + #include "lint.h" + #include "thr_uberdata.h" + #include <stdarg.h> |