summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-02-12 18:16:20 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-02-12 18:16:20 +0400
commit747a5c0d3b75de985c3ace986b6ed5256fedfc88 (patch)
tree8981738d4d477e5905d1a4442a1206008c55aa70 /libc
parent4765e930c7eb95b29869ede7e7b2c7e8a13f856b (diff)
downloadillumos-packaging-747a5c0d3b75de985c3ace986b6ed5256fedfc88.tar.gz
Added mkostemp() and mkostemps()
Diffstat (limited to 'libc')
-rw-r--r--libc/debian/changelog1
-rw-r--r--libc/debian/libc1-illumos-i386.symbols4
-rw-r--r--libc/debian/libc1.symbols.illumos-amd642
-rw-r--r--libc/debian/patches/libc-add-mkostemp.patch146
-rw-r--r--libc/debian/patches/series1
5 files changed, 154 insertions, 0 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog
index ccf2176..51a04f4 100644
--- a/libc/debian/changelog
+++ b/libc/debian/changelog
@@ -1,6 +1,7 @@
libc (2.10+16) UNRELEASED; urgency=medium
* Added qsort_r() [libc-add-qsort_r.patch]
+ * Added mkostemp() and mkostemps() [libc-add-mkostemp.patch]
-- Igor Pashev <pashev.igor@gmail.com> Wed, 12 Feb 2014 14:59:10 +0400
diff --git a/libc/debian/libc1-illumos-i386.symbols b/libc/debian/libc1-illumos-i386.symbols
index 772265a..26f10a5 100644
--- a/libc/debian/libc1-illumos-i386.symbols
+++ b/libc/debian/libc1-illumos-i386.symbols
@@ -1650,6 +1650,10 @@ libc.so.1 libc1-illumos-i386 #MINVER#
mkfifoat@SUNW_1.23 2.10-1
mknod@SYSVABI_1.3 2.10-1
mknodat@SUNW_1.23 2.10-1
+ mkostemp64@DYSON_1 2.10+16
+ mkostemp@DYSON_1 2.10+16
+ mkostemps64@DYSON_1 2.10+16
+ mkostemps@DYSON_1 2.10+16
mkstemp64@SUNW_1.1 2.10-1
mkstemp@SUNW_0.7 2.10-1
mkstemps64@SUNW_1.23 2.10-1
diff --git a/libc/debian/libc1.symbols.illumos-amd64 b/libc/debian/libc1.symbols.illumos-amd64
index ca833d9..1a90357 100644
--- a/libc/debian/libc1.symbols.illumos-amd64
+++ b/libc/debian/libc1.symbols.illumos-amd64
@@ -1557,6 +1557,8 @@ libc.so.1 libc1 #MINVER#
mkfifoat@SUNW_1.23 2.10-1
mknod@SUNW_0.7 2.10-1
mknodat@SUNW_1.23 2.10-1
+ mkostemp@DYSON_1 2.10+16
+ mkostemps@DYSON_1 2.10+16
mkstemp@SUNW_0.7 2.10-1
mkstemps@SUNW_1.23 2.10-1
mktemp@SUNW_0.7 2.10-1
diff --git a/libc/debian/patches/libc-add-mkostemp.patch b/libc/debian/patches/libc-add-mkostemp.patch
new file mode 100644
index 0000000..a998c7c
--- /dev/null
+++ b/libc/debian/patches/libc-add-mkostemp.patch
@@ -0,0 +1,146 @@
+Index: libc/usr/src/lib/libc/port/gen/mkstemp.c
+===================================================================
+--- libc.orig/usr/src/lib/libc/port/gen/mkstemp.c 2012-10-08 04:25:38.000000000 +0400
++++ libc/usr/src/lib/libc/port/gen/mkstemp.c 2014-02-12 15:07:17.078247281 +0400
+@@ -40,6 +40,8 @@
+ #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
+ #define mkstemp mkstemp64
+ #define mkstemps mkstemps64
++#define mkostemp mkostemp64
++#define mkostemps mkostemps64
+ #define libc_mkstemps libc_mkstemps64 /* prefer unique statics */
+ #pragma weak _mkstemp64 = mkstemp64
+ #else
+@@ -59,7 +61,7 @@
+ extern char *libc_mktemps(char *, int);
+
+ static int
+-libc_mkstemps(char *as, int slen)
++libc_mkstemps(char *as, int slen, int flags)
+ {
+ int fd;
+ int len;
+@@ -91,11 +93,11 @@
+ }
+ }
+ #if _FILE_OFFSET_BITS == 64
+- if ((fd = open64(as, O_CREAT|O_EXCL|O_RDWR, 0600)) != -1) {
++ if ((fd = open64(as, O_CREAT|O_EXCL|O_RDWR|flags, 0600)) != -1) {
+ return (fd);
+ }
+ #else
+- if ((fd = open(as, O_CREAT|O_EXCL|O_RDWR, 0600)) != -1) {
++ if ((fd = open(as, O_CREAT|O_EXCL|O_RDWR|flags, 0600)) != -1) {
+ return (fd);
+ }
+ #endif /* _FILE_OFFSET_BITS == 64 */
+@@ -116,11 +118,23 @@
+ int
+ mkstemp(char *as)
+ {
+- return (libc_mkstemps(as, 0));
++ return (libc_mkstemps(as, 0, 0));
+ }
+
+ int
+ mkstemps(char *as, int slen)
+ {
+- return (libc_mkstemps(as, slen));
++ return (libc_mkstemps(as, slen, 0));
++}
++
++int
++mkostemp(char *as, int flags)
++{
++ return (libc_mkstemps(as, 0, flags));
++}
++
++int
++mkostemps(char *as, int slen, int flags)
++{
++ return (libc_mkstemps(as, slen, flags));
+ }
+Index: libc/usr/src/lib/libc/port/mapfile-vers
+===================================================================
+--- libc.orig/usr/src/lib/libc/port/mapfile-vers 2014-02-12 14:22:27.748474348 +0400
++++ libc/usr/src/lib/libc/port/mapfile-vers 2014-02-12 15:19:18.575317264 +0400
+@@ -110,6 +110,8 @@
+ gnu_strerror_r;
+ mempcpy;
+ memrchr;
++ mkostemp;
++ mkostemps;
+ program_invocation_name;
+ program_invocation_short_name;
+ qsort_r;
+@@ -117,6 +119,8 @@
+ sendfile;
+ sendfilev;
+ $if _ELF32
++ mkostemp64;
++ mkostemps64;
+ sendfile64;
+ sendfilev64;
+ $endif
+Index: libc/usr/src/head/stdlib.h
+===================================================================
+--- libc.orig/usr/src/head/stdlib.h 2014-02-12 14:33:03.293978876 +0400
++++ libc/usr/src/head/stdlib.h 2014-02-12 17:46:39.040994870 +0400
+@@ -98,9 +98,17 @@
+ #ifdef __PRAGMA_REDEFINE_EXTNAME
+ #pragma redefine_extname mkstemp mkstemp64
+ #pragma redefine_extname mkstemps mkstemps64
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++#pragma redefine_extname mkostemp mkostemp64
++#pragma redefine_extname mkostemps mkostemps64
++#endif
+ #else /* __PRAGMA_REDEFINE_EXTNAME */
+ #define mkstemp mkstemp64
+ #define mkstemps mkstemps64
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++#define mkostemp mkostemp64
++#define mkostemps mkostemps64
++#endif
+ #endif /* __PRAGMA_REDEFINE_EXTNAME */
+
+ #endif /* _FILE_OFFSET_BITS == 64 */
+@@ -111,9 +119,17 @@
+ #ifdef __PRAGMA_REDEFINE_EXTNAME
+ #pragma redefine_extname mkstemp64 mkstemp
+ #pragma redefine_extname mkstemps64 mkstemps
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++#pragma redefine_extname mkostemp64 mkostemp
++#pragma redefine_extname mkostemps64 mkostemps
++#endif
+ #else /* __PRAGMA_REDEFINE_EXTNAME */
+ #define mkstemp64 mkstemp
+ #define mkstemps64 mkstemps
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++#define mkostemp64 mkostemp
++#define mkostemps64 mkostemps
++#endif
+ #endif /* __PRAGMA_REDEFINE_EXTNAME */
+
+ #endif /* _LP64 && _LARGEFILE64_SOURCE */
+@@ -172,6 +188,10 @@
+ #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
+ extern int mkstemps(char *, int);
+ #endif
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++int mkostemp(char *, int);
++int mkostemps(char *, int, int);
++#endif
+ #endif /* defined(__EXTENSIONS__) ... */
+
+ #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
+@@ -180,6 +200,10 @@
+ #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
+ extern int mkstemps64(char *, int);
+ #endif
++#if defined(_GNU_SOURCE) || defined(__EXTENSIONS__)
++int mkostemp64(char *, int);
++int mkostemps64(char *, int, int);
++#endif
+ #endif /* _LARGEFILE64_SOURCE... */
+
+ #if defined(__EXTENSIONS__) || \
diff --git a/libc/debian/patches/series b/libc/debian/patches/series
index 3834d39..708ad63 100644
--- a/libc/debian/patches/series
+++ b/libc/debian/patches/series
@@ -104,3 +104,4 @@ illumos-3687-fopen-e.patch
illumos-4294-fopen-x.patch
libc-printf-q-length-modifier.patch
libc-add-qsort_r.patch
+libc-add-mkostemp.patch