Commit 1e4ece4a authored by Paul Eggert's avatar Paul Eggert

* doc/gnulib-tool.texi (Initial import): Update to match current

behavior with strdup module.
* lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
* lib/memmem.h: Remove; all uses removed.  This is now done
by <string.h>.
* lib/mempcpy.h: Likewise.
* lib/memrchr.h: Likewise.
* lib/stpcpy.h: Likewise.
* lib/stpncpy.h: Likewise.
* lib/strcase.h: Likewise.
* lib/strchrnul.h: Likewise.
* lib/strdup.h: Likewise.
* lib/strndup.h: Likewise.
* lib/strnlen.h: Likewise.
* lib/strpbrk.h: Likewise.
* lib/strsep.h: Likewise.
* lib/strstr.h: Likewise.
* lib/strtok_r.h: Likewise.
* lib/string_.h: New file.
* lib/argp-namefrob.h: Don't include no-longer-existent include files.
Rely on <string.h> instead.
* lib/canon-host.c: Likewise.
* lib/chdir-long.c: Likewise.
* lib/concatpath.c: Likewise.
* lib/exclude.c: Likewise.
* lib/fchdir.c: Likewise.
* lib/getaddrinfo.c: Likewise.
* lib/getcwd.c: Likewise.
* lib/getsubopt.c: Likewise.
* lib/glob.c: Likewise.
* lib/hard-locale.c: Likewise.
* lib/iconvme.c: Likewise.
* lib/javacomp.c: Likewise.
* lib/mempcpy.c: Likewise.
* lib/memrchr.c: Likewise.
* lib/regex_internal.h: Likewise.
* lib/stpncpy.c: Likewise.
* lib/strcasecmp.c: Likewise.
* lib/strchrnul.c: Likewise.
* lib/strdup.c: Likewise.
* lib/striconv.c: Likewise.
* lib/striconveh.c: Likewise.
* lib/striconveha.c: Likewise.
* lib/strncasecmp.c: Likewise.
* lib/strndup.c: Likewise.
* lib/strnlen.c: Likewise.
* lib/strsep.c: Likewise.
* lib/strstr.c: Likewise.
* lib/strtok_r.c: Likewise.
* lib/userspec.c: Likewise.
* lib/w32spawn.h: Likewise.
* lib/xstrndup.c: Likewise.
* lib/mountlist.c (strstr): Remove decl.
* m4/string_h.m4: New file.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
* m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
* m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
* m4/strcase.m4 (gl_FUNC_STRCASECMP):
Set REPLACE_STRCASECMP if necessary.
(gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
* m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
* m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
HAVE_DECL_STRDUP if necessary.
(gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
since gl_FUNC_STRNDUP does that now.
* m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
Check for decl here...
(gl_PREREQ_STRNLEN): ... not here.
* m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
* m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
* m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
necessary.
* modules/string: New file.
* modules/memmem (Files): Remove special-purpose include file.
(Depends-on): Add string.
(Include): Include <string.h>, not the removed file.
* modules/mempcpy: Likewise.
* modules/memrchr: Likewise.
* modules/stpcpy: Likewise.
* modules/stpncpy: Likewise.
* modules/strcase: Likewise.
* modules/strchrnul: Likewise.
* modules/strdup: Likewise.
* modules/strndup: Likewise.
* modules/strnlen: Likewise.
* modules/strpbrk: Likewise.
* modules/strsep: Likewise.
* modules/strstr: Likewise.
* modules/strtok_r: Likewise.
* tests/test-dirname.c: Don't include "stdup.h", since
<string.h> now suffices.
* tests/test-memmem.c: Don't include "memmem.h", since
<string.h> now suffices.
parent 00da503f
2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
* doc/gnulib-tool.texi (Initial import): Update to match current
behavior with strdup module.
* lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
* lib/memmem.h: Remove; all uses removed. This is now done
by <string.h>.
* lib/mempcpy.h: Likewise.
* lib/memrchr.h: Likewise.
* lib/stpcpy.h: Likewise.
* lib/stpncpy.h: Likewise.
* lib/strcase.h: Likewise.
* lib/strchrnul.h: Likewise.
* lib/strdup.h: Likewise.
* lib/strndup.h: Likewise.
* lib/strnlen.h: Likewise.
* lib/strpbrk.h: Likewise.
* lib/strsep.h: Likewise.
* lib/strstr.h: Likewise.
* lib/strtok_r.h: Likewise.
* lib/string_.h: New file.
* lib/argp-namefrob.h: Don't include no-longer-existent include files.
Rely on <string.h> instead.
* lib/canon-host.c: Likewise.
* lib/chdir-long.c: Likewise.
* lib/concatpath.c: Likewise.
* lib/exclude.c: Likewise.
* lib/fchdir.c: Likewise.
* lib/getaddrinfo.c: Likewise.
* lib/getcwd.c: Likewise.
* lib/getsubopt.c: Likewise.
* lib/glob.c: Likewise.
* lib/hard-locale.c: Likewise.
* lib/iconvme.c: Likewise.
* lib/javacomp.c: Likewise.
* lib/mempcpy.c: Likewise.
* lib/memrchr.c: Likewise.
* lib/regex_internal.h: Likewise.
* lib/stpncpy.c: Likewise.
* lib/strcasecmp.c: Likewise.
* lib/strchrnul.c: Likewise.
* lib/strdup.c: Likewise.
* lib/striconv.c: Likewise.
* lib/striconveh.c: Likewise.
* lib/striconveha.c: Likewise.
* lib/strncasecmp.c: Likewise.
* lib/strndup.c: Likewise.
* lib/strnlen.c: Likewise.
* lib/strsep.c: Likewise.
* lib/strstr.c: Likewise.
* lib/strtok_r.c: Likewise.
* lib/userspec.c: Likewise.
* lib/w32spawn.h: Likewise.
* lib/xstrndup.c: Likewise.
* lib/mountlist.c (strstr): Remove decl.
* m4/string_h.m4: New file.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
* m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
* m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
* m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
* m4/strcase.m4 (gl_FUNC_STRCASECMP):
Set REPLACE_STRCASECMP if necessary.
(gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
* m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
* m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
HAVE_DECL_STRDUP if necessary.
(gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
since gl_FUNC_STRNDUP does that now.
* m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
Check for decl here...
(gl_PREREQ_STRNLEN): ... not here.
* m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
* m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
* m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
necessary.
* modules/string: New file.
* modules/memmem (Files): Remove special-purpose include file.
(Depends-on): Add string.
(Include): Include <string.h>, not the removed file.
* modules/mempcpy: Likewise.
* modules/memrchr: Likewise.
* modules/stpcpy: Likewise.
* modules/stpncpy: Likewise.
* modules/strcase: Likewise.
* modules/strchrnul: Likewise.
* modules/strdup: Likewise.
* modules/strndup: Likewise.
* modules/strnlen: Likewise.
* modules/strpbrk: Likewise.
* modules/strsep: Likewise.
* modules/strstr: Likewise.
* modules/strtok_r: Likewise.
* tests/test-dirname.c: Don't include "stdup.h", since
<string.h> now suffices.
* tests/test-memmem.c: Don't include "memmem.h", since
<string.h> now suffices.
2007-01-25 Bruno Haible <bruno@clisp.org> 2007-01-25 Bruno Haible <bruno@clisp.org>
* lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
......
@node Invoking gnulib-tool @node Invoking gnulib-tool
@chapter Invoking gnulib-tool @chapter Invoking gnulib-tool
@c Copyright (C) 2005, 2006 Free Software Foundation, Inc. @c Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document @c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.2 or @c under the terms of the GNU Free Documentation License, Version 1.2 or
...@@ -48,29 +48,42 @@ Gnulib is used. ...@@ -48,29 +48,42 @@ Gnulib is used.
Our example will be a library that uses Autoconf, Automake and Our example will be a library that uses Autoconf, Automake and
Libtool. It calls @code{strdup}, and you wish to use gnulib to make Libtool. It calls @code{strdup}, and you wish to use gnulib to make
the package portable to C89 (which doesn't have @code{strdup}). the package portable to C89 and C99 (which don't have @code{strdup}).
@example @example
~/src/libfoo$ gnulib-tool --import strdup ~/src/libfoo$ gnulib-tool --import strdup
Module list with included dependencies: Module list with included dependencies:
absolute-header
extensions
strdup strdup
string
File list: File list:
lib/dummy.c
lib/strdup.c lib/strdup.c
lib/strdup.h lib/string_.h
m4/onceonly_2_57.m4 m4/absolute-header.m4
m4/extensions.m4
m4/gnulib-common.m4
m4/strdup.m4 m4/strdup.m4
Copying file m4/gnulib-tool.m4 m4/string_h.m4
Copying file m4/onceonly_2_57.m4 Creating directory ./lib
Creating directory ./m4
Copying file lib/dummy.c
Copying file lib/strdup.c Copying file lib/strdup.c
Copying file lib/strdup.h Copying file lib/string_.h
Copying file m4/absolute-header.m4
Copying file m4/extensions.m4
Copying file m4/gnulib-common.m4
Copying file m4/gnulib-tool.m4
Copying file m4/strdup.m4 Copying file m4/strdup.m4
Copying file m4/string_h.m4
Creating lib/Makefile.am Creating lib/Makefile.am
Creating m4/gnulib-cache.m4 Creating m4/gnulib-cache.m4
Creating m4/gnulib-comp.m4 Creating m4/gnulib-comp.m4
Finished. Finished.
You may need to add #include directives for the following .h files. You may need to add #include directives for the following .h files.
#include "strdup.h" #include <string.h>
Don't forget to Don't forget to
- add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac, - add "lib/Makefile" to AC_CONFIG_FILES in ./configure.ac,
...@@ -212,7 +225,7 @@ LDADD = lib/libgnu.a ...@@ -212,7 +225,7 @@ LDADD = lib/libgnu.a
@end example @end example
Don't forget to @code{#include} the various header files. In this Don't forget to @code{#include} the various header files. In this
example, you would need to make sure that @samp{#include "strdup.h"} example, you would need to make sure that @samp{#include <string.h>}
is evaluated when compiling all source code files, that want to make is evaluated when compiling all source code files, that want to make
use of @code{strdup}. use of @code{strdup}.
......
...@@ -34,10 +34,6 @@ socket_.h ...@@ -34,10 +34,6 @@ socket_.h
stat-time.h stat-time.h
stdbool_.h stdbool_.h
stdint_.h stdint_.h
strcase.h
strdup.h
strndup.h
strnlen.h
strnlen1.h strnlen1.h
strtoul.c strtoul.c
time_r.h time_r.h
......
/* Name frobnication for compiling argp outside of glibc /* Name frobnication for compiling argp outside of glibc
Copyright (C) 1997, 2003 Free Software Foundation, Inc. Copyright (C) 1997, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>. Written by Miles Bader <miles@gnu.ai.mit.edu>.
...@@ -76,11 +76,6 @@ ...@@ -76,11 +76,6 @@
#undef __argp_fmtstream_wmargin #undef __argp_fmtstream_wmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
#include "mempcpy.h"
#include "strcase.h"
#include "strchrnul.h"
#include "strndup.h"
/* normal libc functions we call */ /* normal libc functions we call */
#undef __flockfile #undef __flockfile
#define __flockfile flockfile #define __flockfile flockfile
......
/* Host name canonicalization /* Host name canonicalization
Copyright (C) 2005, 2006 Free Software Foundation, Inc. Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com>. Written by Derek Price <derek@ximbiot.com>.
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
#include "canon-host.h" #include "canon-host.h"
#include <string.h>
#include "getaddrinfo.h" #include "getaddrinfo.h"
#include "strdup.h"
/* Store the last error for the single-threaded version of this function. */ /* Store the last error for the single-threaded version of this function. */
static int last_cherror; static int last_cherror;
......
/* provide a chdir function that tries not to fail due to ENAMETOOLONG /* provide a chdir function that tries not to fail due to ENAMETOOLONG
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include "memrchr.h"
#include "openat.h" #include "openat.h"
#ifndef PATH_MAX #ifndef PATH_MAX
......
/* Construct a full pathname from a directory and a filename. /* Construct a full pathname from a directory and a filename.
Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc. Copyright (C) 2001-2004, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <string.h> #include <string.h>
#include "xalloc.h" #include "xalloc.h"
#include "stpcpy.h"
/* Concatenate a directory pathname, a relative pathname and an optional /* Concatenate a directory pathname, a relative pathname and an optional
suffix. The directory may end with the directory separator. The second suffix. The directory may end with the directory separator. The second
......
/* exclude.c -- exclude file names /* exclude.c -- exclude file names
Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003, Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc. 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "exclude.h" #include "exclude.h"
#include "fnmatch.h" #include "fnmatch.h"
#include "strcase.h"
#include "xalloc.h" #include "xalloc.h"
#include "verify.h" #include "verify.h"
......
/* fchdir replacement. /* fchdir replacement.
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -28,7 +29,6 @@ ...@@ -28,7 +29,6 @@
#include "canonicalize.h" #include "canonicalize.h"
#include "dirfd.h" #include "dirfd.h"
#include "strdup.h"
/* This replacement assumes that a directory is not renamed while opened /* This replacement assumes that a directory is not renamed while opened
through a file descriptor. */ through a file descriptor. */
......
/* Get address information (partial implementation). /* Get address information (partial implementation).
Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006 Free Software Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
Foundation, Inc. Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>. Contributed by Simon Josefsson <simon@josefsson.org>.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* Get calloc. */ /* Get calloc. */
#include <stdlib.h> #include <stdlib.h>
/* Get memcpy. */ /* Get memcpy, strdup. */
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "inet_ntop.h" #include "inet_ntop.h"
#include "snprintf.h" #include "snprintf.h"
#include "strdup.h"
/* BeOS has AF_INET, but not PF_INET. */ /* BeOS has AF_INET, but not PF_INET. */
#ifndef PF_INET #ifndef PF_INET
......
/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2004,2005,2006 Free Software /* Copyright (C) 1991,92,93,94,95,96,97,98,99,2004,2005,2006,2007 Free Software
Foundation, Inc. Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
# ifndef mempcpy # ifndef mempcpy
# define mempcpy __mempcpy # define mempcpy __mempcpy
# endif # endif
#else
# include "mempcpy.h"
#endif #endif
#include <limits.h> #include <limits.h>
......
/* Parse comma separate list into words. /* Parse comma separate list into words.
Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc. Copyright (C) 1996, 1997, 1999, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
/* This code is written for inclusion in gnu-libc, and uses names in /* This code is written for inclusion in gnu-libc, and uses names in
the namespace reserved for libc. If we're compiling in gnulib, the namespace reserved for libc. If we're compiling in gnulib,
define those names to be the normal ones instead. */ define those names to be the normal ones instead. */
# include "strchrnul.h"
# undef __strchrnul # undef __strchrnul
# define __strchrnul strchrnul # define __strchrnul strchrnul
#endif #endif
......
/* Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc. /* Copyright (C) 1991-2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
...@@ -133,8 +133,6 @@ ...@@ -133,8 +133,6 @@
# define struct_stat64 struct stat64 # define struct_stat64 struct stat64
#else /* !_LIBC */ #else /* !_LIBC */
# include "getlogin_r.h" # include "getlogin_r.h"
# include "mempcpy.h"
# include "strdup.h"
# define __stat64(fname, buf) stat (fname, buf) # define __stat64(fname, buf) stat (fname, buf)
# define struct_stat64 struct stat # define struct_stat64 struct stat
# define __stat(fname, buf) stat (fname, buf) # define __stat(fname, buf) stat (fname, buf)
......
/* hard-locale.c -- Determine whether a locale is hard. /* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006 Free Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006, 2007 Free
Software Foundation, Inc. Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "strdup.h"
#ifdef __GLIBC__ #ifdef __GLIBC__
# define GLIBC_VERSION __GLIBC__ # define GLIBC_VERSION __GLIBC__
#else #else
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* Get malloc. */ /* Get malloc. */
#include <stdlib.h> #include <stdlib.h>
/* Get strcmp. */ /* Get strcmp, strdup. */
#include <string.h> #include <string.h>
/* Get errno. */ /* Get errno. */
...@@ -31,9 +31,6 @@ ...@@ -31,9 +31,6 @@
#ifdef _LIBC #ifdef _LIBC
# define HAVE_ICONV 1 # define HAVE_ICONV 1
#else
/* Get strdup. */
# include "strdup.h"
#endif #endif
#if HAVE_ICONV #if HAVE_ICONV
......
/* Compile a Java program. /* Compile a Java program.
Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. Copyright (C) 2001-2003, 2006, 2007 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001. Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include "clean-temp.h" #include "clean-temp.h"
#include "error.h" #include "error.h"
#include "xvasprintf.h" #include "xvasprintf.h"
#include "strstr.h"
#include "gettext.h" #include "gettext.h"
#define _(str) gettext (str) #define _(str) gettext (str)
......
/*
* Copyright (C) 2004 Free Software Foundation
* Written by Simon Josefsson
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA. */
#ifndef MEMMEM_H
# define MEMMEM_H
/* Get memmem, if available. */
# include <string.h>
# if defined HAVE_DECL_MEMMEM && !HAVE_DECL_MEMMEM
void *
memmem (const void *haystack, size_t haystack_len,
const void *needle, size_t needle_len);
# endif
#endif /* MEMMEM_H */
/* Copy memory area and return pointer after last written byte. /* Copy memory area and return pointer after last written byte.
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
/* Specification. */ /* Specification. */
#include "mempcpy.h"
#include <string.h> #include <string.h>
/* Copy N bytes of SRC to DEST, return pointer to bytes after the /* Copy N bytes of SRC to DEST, return pointer to bytes after the
......
/* Copy memory area and return pointer after last written byte.
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef mempcpy
# if HAVE_MEMPCPY
/* Get mempcpy() declaration. */
# include <string.h>
# else
/* Get size_t */
# include <stddef.h>
/* Copy N bytes of SRC to DEST, return pointer to bytes after the
last written byte. */
extern void *mempcpy (void *dest, const void *src, size_t n);
# endif
#endif
/* memrchr -- find the last occurrence of a byte in a memory block /* memrchr -- find the last occurrence of a byte in a memory block
Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005, Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005,
2006 Free Software Foundation, Inc. 2006, 2007 Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se), Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and with help from Dan Sahlin (dan@sics.se) and
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
# include <memcopy.h> # include <memcopy.h>
#else #else
# include <config.h> # include <config.h>
# include "memrchr.h"
# define reg_char char # define reg_char char
#endif #endif
......
/* memrchr -- Find the last occurrence of a byte in a memory block.
Copyright (C) 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_DECL_MEMRCHR
# include <string.h>
#else
# include <stddef.h>
/* Search backwards through a block for a byte (specified as an int). */
void *memrchr (void const *, int, size_t);
#endif
/* mountlist.c -- return a list of mounted file systems /* mountlist.c -- return a list of mounted file systems
Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc. 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -28,10 +28,6 @@ ...@@ -28,10 +28,6 @@
#include "xalloc.h" #include "xalloc.h"
#ifndef strstr
char *strstr ();
#endif
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifndef _LIBC
# include "strcase.h"
#endif
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h> # include <langinfo.h>
#endif #endif
......
/* String copying.
Copyright (C) 1995, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _STPCPY_H