[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
relocatable-prog-wrapper simplification
From: |
Bruno Haible |
Subject: |
relocatable-prog-wrapper simplification |
Date: |
Sat, 21 May 2011 23:36:32 +0200 |
User-agent: |
KMail/1.9.9 |
The platforms which have no strerror() are no longer among gnulib's
portability targets. So it's OK to assume strerror() exists, and the 'strerror'
module in its current form is overkill for relocwrapper.c.
2011-05-21 Bruno Haible <address@hidden>
relocatable-prog-wrapper: Assume strerror() exists.
* modules/relocatable-prog-wrapper (Files): Remove lib/strerror.c,
m4/strerror.m4.
(configure.ac): Don't invoke gl_FUNC_STRERROR_SEPARATE.
* lib/relocwrapper.c: Remove mention of strerror module.
* lib/strerror.c: Assume REPLACE_STRERROR is 1.
* m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Remove macro.
(gl_FUNC_STRERROR): Inline it here. Don't define REPLACE_STRERROR as a
C macro.
--- lib/relocwrapper.c.orig Sat May 21 23:33:22 2011
+++ lib/relocwrapper.c Sat May 21 23:08:54 2011
@@ -29,7 +29,6 @@
-> relocatable
-> setenv
-> malloca
- -> strerror
-> c-ctype
Macros that need to be set while compiling this file:
--- lib/strerror.c.orig Sat May 21 23:33:22 2011
+++ lib/strerror.c Sat May 21 23:32:47 2011
@@ -20,18 +20,14 @@
/* Specification. */
#include <string.h>
-#if REPLACE_STRERROR
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
-# include <errno.h>
-# include <stdio.h>
-# include <stdlib.h>
-
-# include "intprops.h"
-# include "verify.h"
+#include "intprops.h"
+#include "verify.h"
/* Use the system functions, not the gnulib overrides in this file. */
-# undef sprintf
-
-# include "strerror-impl.h"
+#undef sprintf
-#endif
+#include "strerror-impl.h"
--- m4/strerror.m4.orig Sat May 21 23:33:22 2011
+++ m4/strerror.m4 Sat May 21 23:31:41 2011
@@ -1,4 +1,4 @@
-# strerror.m4 serial 10
+# strerror.m4 serial 11
dnl Copyright (C) 2002, 2007-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,
@@ -6,17 +6,6 @@
AC_DEFUN([gl_FUNC_STRERROR],
[
- AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
- if test $REPLACE_STRERROR = 1; then
- AC_LIBOBJ([strerror])
- AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
- [Define this to 1 if strerror is broken.])
- fi
-])
-
-# Like gl_FUNC_STRERROR, except prepare for separate compilation (no
AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
-[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REQUIRE([gl_HEADER_ERRNO_H])
if test -z "$ERRNO_H"; then
@@ -49,6 +38,7 @@
REPLACE_STRERROR=1
fi
if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
gl_PREREQ_STRERROR
fi
])
--- modules/relocatable-prog-wrapper.orig Sat May 21 23:33:22 2011
+++ modules/relocatable-prog-wrapper Sat May 21 23:09:36 2011
@@ -21,7 +21,6 @@
lib/relocatable.h
lib/relocatable.c
lib/setenv.c
-lib/strerror.c
lib/c-ctype.h
lib/c-ctype.c
m4/malloca.m4
@@ -32,7 +31,6 @@
m4/readlink.m4
m4/relocatable-lib.m4
m4/setenv.m4
-m4/strerror.m4
Depends-on:
alloca-opt
@@ -54,7 +52,6 @@
gl_MALLOCA
gl_RELOCATABLE_LIBRARY_SEPARATE
gl_FUNC_SETENV_SEPARATE
-gl_FUNC_STRERROR_SEPARATE
Makefile.am:
--
In memoriam Alfred Grünberg <http://en.wikipedia.org/wiki/Alfred_Grünberg>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- relocatable-prog-wrapper simplification,
Bruno Haible <=