diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-03-26 01:17:59 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-03-26 01:17:59 +0300 |
commit | 6abb073498944f375bcd0731b74dca87bb98b604 (patch) | |
tree | 82516c2c4fd9a784722fe546d0b2d027c461cffa /libc/debian | |
parent | 543d4963731d6de8892ff0e65ab4e072f8d482bd (diff) | |
download | illumos-packaging-6abb073498944f375bcd0731b74dca87bb98b604.tar.gz |
libc (4.3+10) unstable; urgency=medium
* Define __EXTENSIONS__ and _BSD_SOURCE by default.
Define _GNU_SOURCE is __EXTENSIONS__ is defined.
(debian/compat_headers/features.h)
* Updated debian/patches/struct-tm.patch
* libnsl uses getdomainname from unistd.h
(debian/patches/libnsl-getdomainname.patch)
Diffstat (limited to 'libc/debian')
-rw-r--r-- | libc/debian/changelog | 11 | ||||
-rw-r--r-- | libc/debian/compat_headers/features.h | 27 | ||||
-rw-r--r-- | libc/debian/patches/libnsl-getdomainname.patch | 14 | ||||
-rw-r--r-- | libc/debian/patches/series | 1 | ||||
-rw-r--r-- | libc/debian/patches/struct-tm.patch | 8 |
5 files changed, 57 insertions, 4 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog index 4e29bb5..7474084 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -1,3 +1,14 @@ +libc (4.3+10) unstable; urgency=medium + + * Define __EXTENSIONS__ and _BSD_SOURCE by default. + Define _GNU_SOURCE is __EXTENSIONS__ is defined. + (debian/compat_headers/features.h) + * Updated debian/patches/struct-tm.patch + * libnsl uses getdomainname from unistd.h + (debian/patches/libnsl-getdomainname.patch) + + -- Igor Pashev <pashev.igor@gmail.com> Thu, 26 Mar 2015 01:10:48 +0300 + libc (4.3+8) unstable; urgency=medium * debian/patches/string-strings.patch: diff --git a/libc/debian/compat_headers/features.h b/libc/debian/compat_headers/features.h index e4e54e5..bfd2664 100644 --- a/libc/debian/compat_headers/features.h +++ b/libc/debian/compat_headers/features.h @@ -19,6 +19,14 @@ #ifndef _FEATURES_H #define _FEATURES_H +/* __EXTENSIONS__ is defined by default in g++. + * On linux g++ defines _GNU_SOURCE. + */ +#ifdef __EXTENSIONS__ +# undef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + #ifdef _GNU_SOURCE # undef __EXTENSIONS__ # define __EXTENSIONS__ 1 @@ -44,8 +52,27 @@ # define _SVID_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 +# undef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE 1 #endif +#if (defined _DEFAULT_SOURCE \ + || (!defined __STRICT_ANSI__ \ + && !defined _ISOC99_SOURCE \ + && !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \ + && !defined _XOPEN_SOURCE \ + && !defined _BSD_SOURCE && !defined _SVID_SOURCE)) +# undef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +# undef _DEFAULT_SOURCE +# define _DEFAULT_SOURCE 1 +# undef _BSD_SOURCE +# define _BSD_SOURCE 1 +# undef _SVID_SOURCE +# define _SVID_SOURCE 1 +#endif + + #if defined __GNUC__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) diff --git a/libc/debian/patches/libnsl-getdomainname.patch b/libc/debian/patches/libnsl-getdomainname.patch new file mode 100644 index 0000000..25d09a5 --- /dev/null +++ b/libc/debian/patches/libnsl-getdomainname.patch @@ -0,0 +1,14 @@ +Description: getdomainname is define in unistd and visible by default +Index: libc/usr/src/lib/libnsl/yp/yp_bind.c +=================================================================== +--- libc.orig/usr/src/lib/libnsl/yp/yp_bind.c ++++ libc/usr/src/lib/libnsl/yp/yp_bind.c +@@ -55,8 +55,6 @@ int __ypipbufsize = 8192; /* size used + + /* This should match the one in ypbind.c */ + +-extern int getdomainname(char *, int); +- + static CLIENT *getclnt(rpcprog_t, rpcvers_t, struct netconfig *, int *); + static struct dom_binding *load_dom_binding(struct ypbind_resp *, char *, + int *); diff --git a/libc/debian/patches/series b/libc/debian/patches/series index 9d5bab8..1241add 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -117,3 +117,4 @@ string-strings.patch gnu-basename.patch struct-tm.patch i386-regset.patch +libnsl-getdomainname.patch diff --git a/libc/debian/patches/struct-tm.patch b/libc/debian/patches/struct-tm.patch index 7a199aa..1a6a5a8 100644 --- a/libc/debian/patches/struct-tm.patch +++ b/libc/debian/patches/struct-tm.patch @@ -40,8 +40,8 @@ Index: libc/usr/src/lib/libc/port/gen/localtime.c struct tm * gmtime_r(const time_t *timep, struct tm *p_tm) { -+ p_tm->__tm_gmtoff = 0; -+ p_tm->__tm_zone = _tz_gmt; ++ p_tm->tm_gmtoff = 0; ++ p_tm->tm_zone = _tz_gmt; return (offtime_u((time_t)*timep, 0L, p_tm)); } @@ -49,8 +49,8 @@ Index: libc/usr/src/lib/libc/port/gen/localtime.c } my_is_in_dst = is_in_dst; offset = (my_is_in_dst) ? -altzone : -timezone; -+ p_tm->__tm_gmtoff = offset; -+ p_tm->__tm_zone = tzname[0]; ++ p_tm->tm_gmtoff = offset; ++ p_tm->tm_zone = tzname[0]; lmutex_unlock(&_time_lock); if (unused != NULL) free(unused); |