[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposed 'string' module for gnulib
From: |
Paul Eggert |
Subject: |
Re: proposed 'string' module for gnulib |
Date: |
Fri, 26 Jan 2007 00:27:34 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> Please post the new file, modules/string, too :-)
Sorry about that. Also, we need m4/string_h.m4. Here they are:
::::::::::::::
modules/string
::::::::::::::
Description:
A GNU-like <string.h>.
Files:
lib/string_.h
m4/string_h.m4
Depends-on:
absolute-header
extensions
configure.ac:
gl_HEADER_STRING_H
Makefile.am:
BUILT_SOURCES += string.h
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
string.h: string_.h
rm -f address@hidden $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''ABSOLUTE_STRING_H''@|$(ABSOLUTE_STRING_H)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
-e 's|@''REPLACE_STRCASECMP''@|$(REPLACE_STRCASECMP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
< $(srcdir)/string_.h; \
} > address@hidden
mv address@hidden $@
MOSTLYCLEANFILES += string.h string.h-t
Include:
#include <string.h>
License:
LGPL
Maintainer:
all
::::::::::::::
m4/string_h.m4
::::::::::::::
# Configure a GNU-like replacement for <string.h>.
# Copyright (C) 2007 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
AC_DEFUN([gl_HEADER_STRING_H],
[
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_HEADER_STRING_H_BODY])
])
AC_DEFUN([gl_HEADER_STRING_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
gl_ABSOLUTE_HEADER([string.h])
ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
AC_SUBST([ABSOLUTE_STRING_H])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
HAVE_DECL_STRNCASECMP=1; AC_SUBST([HAVE_DECL_STRNCASECMP])
HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
REPLACE_STRCASECMP=0; AC_SUBST([REPLACE_STRCASECMP])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
])
- proposed 'string' module for gnulib, Paul Eggert, 2007/01/26
- Re: proposed 'string' module for gnulib, Jim Meyering, 2007/01/26
- Re: proposed 'string' module for gnulib, Simon Josefsson, 2007/01/26
- Re: proposed 'string' module for gnulib, Yoann Vandoorselaere, 2007/01/26
- Re: [bug-gnulib] proposed 'string' module for gnulib, Bruno Haible, 2007/01/26
- Re: proposed 'string' module for gnulib, Yoann Vandoorselaere, 2007/01/27