r5475 - in glibc-package/branches/eglibc-2.17/debian: . patches patches/any
Author: adconrad
Date: 2013-02-04 02:18:11 +0000 (Mon, 04 Feb 2013)
New Revision: 5475
Added:
glibc-package/branches/eglibc-2.17/debian/patches/any/unsubmitted-cloexec-conditional.diff
Modified:
glibc-package/branches/eglibc-2.17/debian/changelog
glibc-package/branches/eglibc-2.17/debian/patches/series
Log:
debian/patches/any/unsubmitted-cloexec-conditional.diff: Make more
occurences of O_CLOEXEC conditional on it actually being defined.
Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-03 10:54:18 UTC (rev 5474)
+++ glibc-package/branches/eglibc-2.17/debian/changelog 2013-02-04 02:18:11 UTC (rev 5475)
@@ -12,6 +12,8 @@
* debian/patches/any/local-tst-dir-overlayfs.diff: Dropped, as I seem
to be the only person building on overlayfs, and I'll just use aufs.
* Update debian/patches/kfreebsd/local-sysdeps.diff to revision 4353.
+ * debian/patches/any/unsubmitted-cloexec-conditional.diff: Make more
+ occurences of O_CLOEXEC conditional on it actually being defined.
* debian/rules: Don't put x32 debug symbols in libc-dbg (LP: #1106471)
* debian/testsuite-checking/expected-*: Allow all arches to fail the
tst-cputimer1 test, as it harmlessly comes and goes on all of them.
Added: glibc-package/branches/eglibc-2.17/debian/patches/any/unsubmitted-cloexec-conditional.diff
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/any/unsubmitted-cloexec-conditional.diff (rev 0)
+++ glibc-package/branches/eglibc-2.17/debian/patches/any/unsubmitted-cloexec-conditional.diff 2013-02-04 02:18:11 UTC (rev 5475)
@@ -0,0 +1,64 @@
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index dd70c15..4edb03e 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
+@@ -152,6 +152,10 @@ _nl_load_locale_from_archive (int category, const char **namep)
+ int cnt;
+ size_t ps = __sysconf (_SC_PAGE_SIZE);
+ int fd = -1;
++ int oflags = O_RDONLY | O_LARGEFILE;
++#ifdef O_CLOEXEC
++ oflags |= O_CLOEXEC;
++#endif
+
+ /* Check if we have already loaded this locale from the archive.
+ If we previously loaded the locale but found bogons in the data,
+@@ -202,7 +206,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
+ archmapped = &headmap;
+
+ /* The archive has never been opened. */
+- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++ fd = open_not_cancel_2 (archfname, oflags);
+ if (fd < 0)
+ /* Cannot open the archive, for whatever reason. */
+ return NULL;
+@@ -393,8 +397,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
+ if (fd == -1)
+ {
+ struct stat64 st;
+- fd = open_not_cancel_2 (archfname,
+- O_RDONLY|O_LARGEFILE|O_CLOEXEC);
++ fd = open_not_cancel_2 (archfname, oflags);
+ if (fd == -1)
+ /* Cannot open the archive, for whatever reason. */
+ return NULL;
+diff --git a/locale/loadlocale.c b/locale/loadlocale.c
+index de7e3d0..ec5de7c 100644
+--- a/locale/loadlocale.c
++++ b/locale/loadlocale.c
+@@ -168,11 +168,15 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
+ struct __locale_data *newdata;
+ int save_err;
+ int alloc = ld_mapped;
++ int oflags = O_RDONLY;
++#ifdef O_CLOEXEC
++ oflags |= O_CLOEXEC;
++#endif
+
+ file->decided = 1;
+ file->data = NULL;
+
+- fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
++ fd = open_not_cancel_2 (file->filename, oflags);
+ if (__builtin_expect (fd, 0) < 0)
+ /* Cannot open the file. */
+ return;
+@@ -200,7 +204,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
+ _nl_category_names.str + _nl_category_name_idxs[category],
+ _nl_category_name_sizes[category] + 1);
+
+- fd = open_not_cancel_2 (newp, O_RDONLY | O_CLOEXEC);
++ fd = open_not_cancel_2 (newp, oflags);
+ if (__builtin_expect (fd, 0) < 0)
+ return;
+
Modified: glibc-package/branches/eglibc-2.17/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series 2013-02-03 10:54:18 UTC (rev 5474)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series 2013-02-04 02:18:11 UTC (rev 5475)
@@ -221,5 +221,6 @@
any/local-revert-bz13979.diff
any/local-tst-eintr1-eagain.diff
any/cvs-tst-array-as-needed.diff
+any/unsubmitted-cloexec-conditional.diff
any/unsubmitted-ldso-machine-mismatch.diff
any/cvs-use-glibc-wchar.diff
Reply to: