xmalloc: Do not leak if underlying realloc is C99 compatible.
[gnulib.git] / m4 / argp.m4
index 86e0890..c274dd1 100644 (file)
@@ -1,5 +1,5 @@
-# argp.m4 serial 10
-dnl Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc.
+# argp.m4 serial 11
+dnl Copyright (C) 2003-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,20 +32,20 @@ AC_DEFUN([gl_ARGP],
   # be defined and other not, I prefer to stay on the safe side and to
   # test each one separately.
   AC_MSG_CHECKING([whether program_invocation_name is defined])
-  AC_TRY_LINK([#include <argp.h>],
-              [ program_invocation_name = "test"; ],
-              AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
-                 [Define if program_invocation_name is defined])
-                 AC_MSG_RESULT([yes])],
-              [ AC_MSG_RESULT([no])] )
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
+                                  [[program_invocation_name = "test";]])],
+                 [AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], [1],
+                            [Define if program_invocation_name is defined])
+                  AC_MSG_RESULT([yes])],
+                 [AC_MSG_RESULT([no])])
 
   AC_MSG_CHECKING([whether program_invocation_short_name is defined])
-  AC_TRY_LINK([#include <argp.h>],
-              [ program_invocation_short_name = "test"; ],
-              AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
-                 [Define if program_invocation_short_name is defined])
-                 AC_MSG_RESULT([yes])],
-              [ AC_MSG_RESULT([no])] )
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
+                                  [[program_invocation_short_name = "test";]])],
+                 [AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
+                            [Define if program_invocation_short_name is defined])
+                  AC_MSG_RESULT([yes])],
+                 [AC_MSG_RESULT([no])])
 
   AC_CHECK_DECLS_ONCE([clearerr_unlocked])
   AC_CHECK_DECLS_ONCE([feof_unlocked])