[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gsasl branch, master, updated. gsasl-1-3-28-g0ea3e0f
From: |
Simon Josefsson |
Subject: |
[SCM] GNU gsasl branch, master, updated. gsasl-1-3-28-g0ea3e0f |
Date: |
Thu, 05 Nov 2009 14:12:49 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".
http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=0ea3e0f122e3b36f2c7efd5ec3762e382eff928a
The branch, master has been updated
via 0ea3e0f122e3b36f2c7efd5ec3762e382eff928a (commit)
via 915c7fe4166cf247fe5f6424d38f7a320060a73a (commit)
via a674032343dc8bf72abb7203e2225970b3ecd1e9 (commit)
from ff48302934292437cc9ad11936eaca722919e987 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0ea3e0f122e3b36f2c7efd5ec3762e382eff928a
Author: Simon Josefsson <address@hidden>
Date: Thu Nov 5 15:12:39 2009 +0100
Update gnulib files.
commit 915c7fe4166cf247fe5f6424d38f7a320060a73a
Author: Simon Josefsson <address@hidden>
Date: Tue Nov 3 08:49:37 2009 +0100
Fix.
commit a674032343dc8bf72abb7203e2225970b3ecd1e9
Author: Simon Josefsson <address@hidden>
Date: Tue Nov 3 08:48:58 2009 +0100
Add.
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 2 +
gl/Makefile.am | 4 ++
gl/m4/gnulib-comp.m4 | 4 ++
gl/m4/inet_ntop.m4 | 17 +++++----
gl/m4/inet_pton.m4 | 16 +++++++-
gl/m4/stdlib_h.m4 | 6 +++-
gl/stdlib.in.h | 47 +++++++++++++++++++++++++
gltests/Makefile.am | 18 ++++++++++
gltests/test-getaddrinfo.c | 2 +
gltests/{test-getopt.c => test-inet_ntop.c} | 45 +++++++++++-------------
gltests/{test-getopt.c => test-inet_pton.c} | 50 +++++++++++++--------------
gltests/test-sys_socket.c | 2 +-
lib/gl/Makefile.am | 4 ++
lib/gl/m4/stdlib_h.m4 | 6 +++-
lib/gl/stdlib.in.h | 47 +++++++++++++++++++++++++
15 files changed, 206 insertions(+), 64 deletions(-)
copy gltests/{test-getopt.c => test-inet_ntop.c} (67%)
copy gltests/{test-getopt.c => test-inet_pton.c} (59%)
diff --git a/.gitignore b/.gitignore
index d9f45f0..f47bbda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ doc/doxygen/Doxyfile
doc/gsasl-api-error-labels.texi
doc/gsasl.1
doc/gsasl.info
+doc/gsasl.info-1
doc/man/
doc/print-errors
doc/reference/
@@ -126,6 +127,7 @@ lib/gltests/test-gc-sha1
lib/gltests/test-getdelim
lib/gltests/test-getline
lib/gltests/test-memchr
+lib/gltests/test-memmem
lib/gltests/test-rawmemchr
lib/gltests/test-stdbool
lib/gltests/test-stddef
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 28db2ba..d96141b 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -994,7 +994,9 @@ stdlib.h: stdlib.in.h
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
@@ -1013,6 +1015,8 @@ stdlib.h: stdlib.in.h
-e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 669760f..6118da9 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -247,8 +247,10 @@ AC_SUBST([LTALLOCA])
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.17])
gl_FUNC_GETTIMEOFDAY
+ AC_C_BIGENDIAN
gl_INET_PTON
gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
+ AC_C_BIGENDIAN
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
if test "$ac_cv_header_winsock2_h" = yes; then
dnl Even if the 'socket' module is not used here, another part of the
@@ -642,6 +644,8 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-getopt_long.h
tests/test-gettimeofday.c
tests/test-iconv.c
+ tests/test-inet_ntop.c
+ tests/test-inet_pton.c
tests/test-lseek.c
tests/test-lseek.sh
tests/test-malloca.c
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 2bbdca1..2a8ff20 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 9
+# inet_ntop.m4 serial 11
dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,17 +11,18 @@ AC_DEFUN([gl_INET_NTOP],
gl_REPLACE_ARPA_INET_H
- dnl The AC_SEARCH_LIBS call is a hack to persuade the Solaris 8 linker to
- dnl find inet_ntop.
- dnl
- dnl It is the responsibility of gl_INET_NTOP's caller to arrange for
- dnl -lnsl if it is needed. Normally -lnsl is not needed on Solaris 8,
- dnl since inet_ntop is needed only by getaddrinfo, and getaddrinfo
- dnl isn't built on Solaris 8.
+ dnl Most platforms that provide inet_ntop define it in libc.
+ dnl Solaris 8..10 provide inet_ntop in libnsl instead.
gl_save_LIBS=$LIBS
AC_SEARCH_LIBS([inet_ntop], [nsl], [],
[AC_REPLACE_FUNCS([inet_ntop])])
LIBS=$gl_save_LIBS
+ INET_NTOP_LIB=
+ if test "$ac_cv_search_inet_ntop" != "no" &&
+ test "$ac_cv_search_inet_ntop" != "none required"; then
+ INET_NTOP_LIB="$ac_cv_search_inet_ntop"
+ fi
+ AC_SUBST([INET_NTOP_LIB])
gl_PREREQ_INET_NTOP
])
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index e0ec432..e890b9b 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 7
+# inet_pton.m4 serial 9
dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,19 @@ AC_DEFUN([gl_INET_PTON],
gl_REPLACE_ARPA_INET_H
- AC_REPLACE_FUNCS([inet_pton])
+ dnl Most platforms that provide inet_pton define it in libc.
+ dnl Solaris 8..10 provide inet_pton in libnsl instead.
+ gl_save_LIBS=$LIBS
+ AC_SEARCH_LIBS([inet_pton], [nsl], [],
+ [AC_REPLACE_FUNCS([inet_pton])])
+ LIBS=$gl_save_LIBS
+ INET_PTON_LIB=
+ if test "$ac_cv_search_inet_pton" != "no" &&
+ test "$ac_cv_search_inet_pton" != "none required"; then
+ INET_PTON_LIB="$ac_cv_search_inet_pton"
+ fi
+ AC_SUBST([INET_PTON_LIB])
+
gl_PREREQ_INET_PTON
])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 42d551d..4556ac0 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 20
+# stdlib_h.m4 serial 21
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -41,7 +41,9 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
+ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -61,6 +63,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
+ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
+ HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 7a9246a..e2c6bbf 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -224,6 +224,31 @@ extern int mkostemp (char * /*template*/, int /*flags*/);
mkostemp (t, f))
#endif
+#if @GNULIB_MKOSTEMPS@
+# if address@hidden@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE before a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemps
+# define mkostemps(t,s,f) \
+ (GL_LINK_WARNING ("mkostemps is unportable - " \
+ "use gnulib module mkostemps for portability"), \
+ mkostemps (t, s, f))
+#endif
+
#if @GNULIB_MKSTEMP@
# if @REPLACE_MKSTEMP@
/* Create a unique temporary file from TEMPLATE.
@@ -249,6 +274,28 @@ extern int mkstemp (char * /*template*/);
mkstemp (t))
#endif
+#if @GNULIB_MKSTEMPS@
+# if address@hidden@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE prior to a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkstemps (char * /*template*/, int /*suffixlen*/);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemps
+# define mkstemps(t,s) \
+ (GL_LINK_WARNING ("mkstemps is unportable - " \
+ "use gnulib module mkstemps for portability"), \
+ mkstemps (t, s))
+#endif
+
#if @GNULIB_PUTENV@
# if @REPLACE_PUTENV@
# undef putenv
diff --git a/gltests/Makefile.am b/gltests/Makefile.am
index 09dfd4f..cd1958a 100644
--- a/gltests/Makefile.am
+++ b/gltests/Makefile.am
@@ -213,6 +213,15 @@ EXTRA_DIST += test-iconv.c
## end gnulib module iconv-tests
+## begin gnulib module inet_ntop-tests
+
+TESTS += test-inet_ntop
+check_PROGRAMS += test-inet_ntop
+test_inet_ntop_LDADD = $(LDADD) @INET_NTOP_LIB@
+EXTRA_DIST += test-inet_ntop.c
+
+## end gnulib module inet_ntop-tests
+
## begin gnulib module inet_pton
@@ -222,6 +231,15 @@ EXTRA_libtests_a_SOURCES += inet_pton.c
## end gnulib module inet_pton
+## begin gnulib module inet_pton-tests
+
+TESTS += test-inet_pton
+check_PROGRAMS += test-inet_pton
+test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
+EXTRA_DIST += test-inet_pton.c
+
+## end gnulib module inet_pton-tests
+
## begin gnulib module ioctl
diff --git a/gltests/test-getaddrinfo.c b/gltests/test-getaddrinfo.c
index 384b98b..57c1a4d 100644
--- a/gltests/test-getaddrinfo.c
+++ b/gltests/test-getaddrinfo.c
@@ -91,10 +91,12 @@ simple (char const *host, char const *service)
fail the test merely because of this. */
if (res == EAI_SERVICE)
return 0;
+#ifdef EAI_NODATA
/* AIX reports EAI_NODATA for "https". Don't fail the test
merely because of this. */
if (res == EAI_NODATA)
return 0;
+#endif
/* Provide details if errno was set. */
if (res == EAI_SYSTEM)
dbgprintf ("system error: %s\n", strerror (err));
diff --git a/gltests/test-getopt.c b/gltests/test-inet_ntop.c
similarity index 67%
copy from gltests/test-getopt.c
copy to gltests/test-inet_ntop.c
index 6c59d47..71ba5c3 100644
--- a/gltests/test-getopt.c
+++ b/gltests/test-inet_ntop.c
@@ -1,4 +1,4 @@
-/* Test of command line argument processing.
+/* Test of inet_ntop function.
Copyright (C) 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -18,11 +18,10 @@
#include <config.h>
-#if GNULIB_GETOPT_GNU
-# include <getopt.h>
-#endif
-#include <unistd.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -39,30 +38,26 @@
} \
while (0)
-/* The glibc/gnulib implementation of getopt supports setting optind = 0,
- but other implementations don't. */
-#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
-# define OPTIND_MIN 0
-#else
-# define OPTIND_MIN 1
-#endif
-
-#include "test-getopt.h"
-#if GNULIB_GETOPT_GNU
-# include "test-getopt_long.h"
-#endif
-
int
main (void)
{
- unsetenv ("POSIXLY_CORRECT");
-
- test_getopt ();
-#if GNULIB_GETOPT_GNU
- test_getopt_long ();
+#if defined AF_INET /* HAVE_IPV4 */
+ {
+ struct in_addr internal;
+ char printable[16];
+ const char *result;
- setenv ("POSIXLY_CORRECT", "1", 0);
- test_getopt_long_posix ();
+ /* This machine was for a long time known as
+ ma2s2.mathematik.uni-karlsruhe.de. */
+# ifdef WORDS_BIGENDIAN
+ internal.s_addr = 0x810D7302;
+# else
+ internal.s_addr = 0x02730D81;
+# endif
+ result = inet_ntop (AF_INET, &internal, printable, sizeof (printable));
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "129.13.115.2") == 0);
+ }
#endif
return 0;
diff --git a/gltests/test-getopt.c b/gltests/test-inet_pton.c
similarity index 59%
copy from gltests/test-getopt.c
copy to gltests/test-inet_pton.c
index 6c59d47..b6c3ab2 100644
--- a/gltests/test-getopt.c
+++ b/gltests/test-inet_pton.c
@@ -1,4 +1,4 @@
-/* Test of command line argument processing.
+/* Test of inet_pton function.
Copyright (C) 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -18,14 +18,12 @@
#include <config.h>
-#if GNULIB_GETOPT_GNU
-# include <getopt.h>
-#endif
-#include <unistd.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#define ASSERT(expr) \
do \
@@ -39,30 +37,30 @@
} \
while (0)
-/* The glibc/gnulib implementation of getopt supports setting optind = 0,
- but other implementations don't. */
-#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
-# define OPTIND_MIN 0
-#else
-# define OPTIND_MIN 1
-#endif
-
-#include "test-getopt.h"
-#if GNULIB_GETOPT_GNU
-# include "test-getopt_long.h"
-#endif
-
int
main (void)
{
- unsetenv ("POSIXLY_CORRECT");
-
- test_getopt ();
-#if GNULIB_GETOPT_GNU
- test_getopt_long ();
+#if defined AF_INET /* HAVE_IPV4 */
+ {
+ /* This machine was for a long time known as
+ ma2s2.mathematik.uni-karlsruhe.de. */
+ const char printable[] = "129.13.115.2";
+ struct in_addr internal;
+ int ret;
- setenv ("POSIXLY_CORRECT", "1", 0);
- test_getopt_long_posix ();
+ ret = inet_pton (AF_INET, printable, &internal);
+ ASSERT (ret == 1);
+ /* Verify that internal is filled in network byte order. */
+ ASSERT (((unsigned char *) &internal)[0] == 0x81);
+ ASSERT (((unsigned char *) &internal)[1] == 0x0D);
+ ASSERT (((unsigned char *) &internal)[2] == 0x73);
+ ASSERT (((unsigned char *) &internal)[3] == 0x02);
+# ifdef WORDS_BIGENDIAN
+ ASSERT (internal.s_addr == 0x810D7302);
+# else
+ ASSERT (internal.s_addr == 0x02730D81);
+# endif
+ }
#endif
return 0;
diff --git a/gltests/test-sys_socket.c b/gltests/test-sys_socket.c
index ddb491b..606708d 100644
--- a/gltests/test-sys_socket.c
+++ b/gltests/test-sys_socket.c
@@ -47,7 +47,7 @@ main (void)
}
x.ss_family = 42;
- i = 4711;
+ i = 42;
return 0;
}
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 6495eb1..87951d4 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -520,7 +520,9 @@ stdlib.h: stdlib.in.h
-e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
-e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
-e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
-e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
-e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
-e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
-e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
@@ -539,6 +541,8 @@ stdlib.h: stdlib.in.h
-e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
-e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
-e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
diff --git a/lib/gl/m4/stdlib_h.m4 b/lib/gl/m4/stdlib_h.m4
index 42d551d..4556ac0 100644
--- a/lib/gl/m4/stdlib_h.m4
+++ b/lib/gl/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 20
+# stdlib_h.m4 serial 21
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -41,7 +41,9 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
+ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
@@ -61,6 +63,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
+ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
+ HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
diff --git a/lib/gl/stdlib.in.h b/lib/gl/stdlib.in.h
index 837eae8..6ef8504 100644
--- a/lib/gl/stdlib.in.h
+++ b/lib/gl/stdlib.in.h
@@ -224,6 +224,31 @@ extern int mkostemp (char * /*template*/, int /*flags*/);
mkostemp (t, f))
#endif
+#if @GNULIB_MKOSTEMPS@
+# if address@hidden@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE before a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemps
+# define mkostemps(t,s,f) \
+ (GL_LINK_WARNING ("mkostemps is unportable - " \
+ "use gnulib module mkostemps for portability"), \
+ mkostemps (t, s, f))
+#endif
+
#if @GNULIB_MKSTEMP@
# if @REPLACE_MKSTEMP@
/* Create a unique temporary file from TEMPLATE.
@@ -249,6 +274,28 @@ extern int mkstemp (char * /*template*/);
mkstemp (t))
#endif
+#if @GNULIB_MKSTEMPS@
+# if address@hidden@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE prior to a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkstemps (char * /*template*/, int /*suffixlen*/);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemps
+# define mkstemps(t,s) \
+ (GL_LINK_WARNING ("mkstemps is unportable - " \
+ "use gnulib module mkstemps for portability"), \
+ mkstemps (t, s))
+#endif
+
#if @GNULIB_PUTENV@
# if @REPLACE_PUTENV@
# undef putenv
hooks/post-receive
--
GNU gsasl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gsasl branch, master, updated. gsasl-1-3-28-g0ea3e0f,
Simon Josefsson <=