summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-08-12 10:04:16 +0000
committerSimon Josefsson <simon@josefsson.org>2005-08-12 10:04:16 +0000
commite0e7d444f174471c23e85533bfd276b461039d2f (patch)
tree45cbc6b7308fb3d302c183fc3ad02ab679c91e91 /gl
parent73926e1f07bbfa8db522087c37b4e01cf0e3eda0 (diff)
downloadgnutls-e0e7d444f174471c23e85533bfd276b461039d2f.tar.gz
Update.
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am14
-rw-r--r--gl/alloca_.h6
-rw-r--r--gl/asnprintf.c8
-rw-r--r--gl/error.c8
-rw-r--r--gl/error.h8
-rw-r--r--gl/getdelim.c6
-rw-r--r--gl/getdelim.h6
-rw-r--r--gl/getline.c6
-rw-r--r--gl/getline.h6
-rw-r--r--gl/getpass.c8
-rw-r--r--gl/getpass.h8
-rw-r--r--gl/m4/gnulib.m43
-rw-r--r--gl/m4/memmem.m418
-rw-r--r--gl/memmem.c57
-rw-r--r--gl/memmem.h32
-rw-r--r--gl/minmax.h8
-rw-r--r--gl/printf-args.c8
-rw-r--r--gl/printf-args.h8
-rw-r--r--gl/printf-parse.c8
-rw-r--r--gl/printf-parse.h8
-rw-r--r--gl/progname.c53
-rw-r--r--gl/progname.h60
-rw-r--r--gl/size_max.h8
-rw-r--r--gl/snprintf.c8
-rw-r--r--gl/snprintf.h8
-rw-r--r--gl/stdbool_.h8
-rw-r--r--gl/vasnprintf.c8
-rw-r--r--gl/vasnprintf.h8
-rw-r--r--gl/xsize.h8
29 files changed, 199 insertions, 204 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 733466db40..4edc5adaf7 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,7 +9,7 @@
#
# Generated by gnulib-tool.
# Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getdelim getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool --lgpl alloca-opt error getdelim getline getpass-gnu memmem minmax size_max snprintf stdbool vasnprintf xsize
AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
@@ -39,17 +39,17 @@ MOSTLYCLEANFILES += alloca.h alloca.h-t
## end gnulib module alloca-opt
-## begin gnulib module minmax
+## begin gnulib module memmem
-libgnu_la_SOURCES += minmax.h
+libgnu_la_SOURCES += memmem.h
-## end gnulib module minmax
+## end gnulib module memmem
-## begin gnulib module progname
+## begin gnulib module minmax
-libgnu_la_SOURCES += progname.h progname.c
+libgnu_la_SOURCES += minmax.h
-## end gnulib module progname
+## end gnulib module minmax
## begin gnulib module snprintf
diff --git a/gl/alloca_.h b/gl/alloca_.h
index 3e3fdf43f8..65a40ffea6 100644
--- a/gl/alloca_.h
+++ b/gl/alloca_.h
@@ -4,8 +4,8 @@
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)
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
@@ -13,7 +13,7 @@
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
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/asnprintf.c b/gl/asnprintf.c
index 1b7f4ba396..ddc2cd3b78 100644
--- a/gl/asnprintf.c
+++ b/gl/asnprintf.c
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2002 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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/error.c b/gl/error.c
index 45698be8da..33eee4e674 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -3,16 +3,16 @@
This file is part of the GNU C Library.
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/error.h b/gl/error.h
index e5220a2f13..41441e75e1 100644
--- a/gl/error.h
+++ b/gl/error.h
@@ -3,16 +3,16 @@
This file is part of the GNU C Library.
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getdelim.c b/gl/getdelim.c
index 02bb9a4976..aa57afdcf6 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -3,8 +3,8 @@
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
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
@@ -12,7 +12,7 @@
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
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getdelim.h b/gl/getdelim.h
index 8bc61307e5..9e6c931295 100644
--- a/gl/getdelim.h
+++ b/gl/getdelim.h
@@ -2,8 +2,8 @@
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
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
@@ -11,7 +11,7 @@
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
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getline.c b/gl/getline.c
index 00f02f4aea..2cac4c8791 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -2,8 +2,8 @@
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
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
@@ -11,7 +11,7 @@
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
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getline.h b/gl/getline.h
index f0f61c4b2e..d58df19457 100644
--- a/gl/getline.h
+++ b/gl/getline.h
@@ -2,8 +2,8 @@
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
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
@@ -11,7 +11,7 @@
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
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getpass.c b/gl/getpass.c
index 7367251e27..5fa3d595c6 100644
--- a/gl/getpass.c
+++ b/gl/getpass.c
@@ -2,16 +2,16 @@
This file is part of the GNU C Library.
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/getpass.h b/gl/getpass.h
index bdff8754d4..a8c392b30d 100644
--- a/gl/getpass.h
+++ b/gl/getpass.h
@@ -3,16 +3,16 @@
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/m4/gnulib.m4 b/gl/m4/gnulib.m4
index 758d377ca5..26bf538b17 100644
--- a/gl/m4/gnulib.m4
+++ b/gl/m4/gnulib.m4
@@ -8,7 +8,7 @@
# Generated by gnulib-tool.
#
# Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool alloca-opt error getdelim getline getpass-gnu minmax progname size_max snprintf stdbool vasnprintf xsize
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --aux-dir=. --libtool --lgpl alloca-opt error getdelim getline getpass-gnu memmem minmax size_max snprintf stdbool vasnprintf xsize
AC_DEFUN([gl_EARLY],
[
@@ -22,6 +22,7 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GETDELIM
gl_FUNC_GETLINE
gl_FUNC_GETPASS_GNU
+ gl_FUNC_MEMMEM
gl_MINMAX
gl_SIZE_MAX
gl_FUNC_SNPRINTF
diff --git a/gl/m4/memmem.m4 b/gl/m4/memmem.m4
new file mode 100644
index 0000000000..86072eaac1
--- /dev/null
+++ b/gl/m4/memmem.m4
@@ -0,0 +1,18 @@
+# memmem.m4 serial 2
+dnl Copyright (C) 2002, 2003, 2004 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.
+
+AC_DEFUN([gl_FUNC_MEMMEM],
+[
+ dnl Persuade glibc <string.h> to declare memmem().
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REPLACE_FUNCS(memmem)
+ AC_CHECK_DECLS_ONCE(memmem)
+ gl_PREREQ_MEMMEM
+])
+
+# Prerequisites of lib/memmem.c.
+AC_DEFUN([gl_PREREQ_MEMMEM], [:])
diff --git a/gl/memmem.c b/gl/memmem.c
new file mode 100644
index 0000000000..23de38f98f
--- /dev/null
+++ b/gl/memmem.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser 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. */
+
+#include <stddef.h>
+#include <string.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#undef memmem
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+void *
+memmem (haystack, haystack_len, needle, needle_len)
+ const void *haystack;
+ size_t haystack_len;
+ const void *needle;
+ size_t needle_len;
+{
+ const char *begin;
+ const char *const last_possible
+ = (const char *) haystack + haystack_len - needle_len;
+
+ if (needle_len == 0)
+ /* The first occurrence of the empty string is deemed to occur at
+ the beginning of the string. */
+ return (void *) haystack;
+
+ /* Sanity check, otherwise the loop might search through the whole
+ memory. */
+ if (__builtin_expect (haystack_len < needle_len, 0))
+ return NULL;
+
+ for (begin = (const char *) haystack; begin <= last_possible; ++begin)
+ if (begin[0] == ((const char *) needle)[0] &&
+ !memcmp ((const void *) &begin[1],
+ (const void *) ((const char *) needle + 1),
+ needle_len - 1))
+ return (void *) begin;
+
+ return NULL;
+}
diff --git a/gl/memmem.h b/gl/memmem.h
new file mode 100644
index 0000000000..71e76f3198
--- /dev/null
+++ b/gl/memmem.h
@@ -0,0 +1,32 @@
+/*
+ * 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 Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1, 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 */
diff --git a/gl/minmax.h b/gl/minmax.h
index 975ea76d13..431e7dd918 100644
--- a/gl/minmax.h
+++ b/gl/minmax.h
@@ -2,16 +2,16 @@
Copyright (C) 1995, 1998, 2001, 2003, 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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/printf-args.c b/gl/printf-args.c
index 0ed1acbb8d..ba4b8b31fe 100644
--- a/gl/printf-args.c
+++ b/gl/printf-args.c
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/printf-args.h b/gl/printf-args.h
index cec1cc6c2a..38062463b6 100644
--- a/gl/printf-args.h
+++ b/gl/printf-args.h
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/printf-parse.c b/gl/printf-parse.c
index 3d2fb175f2..afd62470eb 100644
--- a/gl/printf-parse.c
+++ b/gl/printf-parse.c
@@ -2,16 +2,16 @@
Copyright (C) 1999-2000, 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/printf-parse.h b/gl/printf-parse.h
index 82a0d37cd7..6d254e4d33 100644
--- a/gl/printf-parse.h
+++ b/gl/printf-parse.h
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/progname.c b/gl/progname.c
deleted file mode 100644
index ea32128ab4..0000000000
--- a/gl/progname.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Program name management.
- Copyright (C) 2001-2003, 2005 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
- 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. */
-
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-/* Specification. */
-#include "progname.h"
-
-#include <string.h>
-
-#undef set_program_name
-
-
-/* String containing name the program is called with.
- To be initialized by main(). */
-const char *program_name = NULL;
-
-/* Set program_name, based on argv[0]. */
-void
-set_program_name (const char *argv0)
-{
- /* libtool creates a temporary executable whose name is sometimes prefixed
- with "lt-" (depends on the platform). It also makes argv[0] absolute.
- Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */
- const char *slash;
- const char *base;
-
- slash = strrchr (argv0, '/');
- base = (slash != NULL ? slash + 1 : argv0);
- if (base - argv0 >= 7 && memcmp (base - 7, "/.libs/", 7) == 0)
- argv0 = base;
- if (strncmp (base, "lt-", 3) == 0)
- argv0 = base + 3;
- program_name = argv0;
-}
diff --git a/gl/progname.h b/gl/progname.h
deleted file mode 100644
index a5d9a04c83..0000000000
--- a/gl/progname.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Program name management.
- Copyright (C) 2001-2004 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
- 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 _PROGNAME_H
-#define _PROGNAME_H
-
-/* Programs using this file should do the following in main():
- set_program_name (argv[0]);
- */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* String containing name the program is called with. */
-extern const char *program_name;
-
-/* Set program_name, based on argv[0]. */
-extern void set_program_name (const char *argv0);
-
-#if ENABLE_RELOCATABLE
-
-/* Set program_name, based on argv[0], and original installation prefix and
- directory, for relocatability. */
-extern void set_program_name_and_installdir (const char *argv0,
- const char *orig_installprefix,
- const char *orig_installdir);
-#define set_program_name(ARG0) \
- set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
-
-/* Return the full pathname of the current executable, based on the earlier
- call to set_program_name_and_installdir. Return NULL if unknown. */
-extern char *get_full_program_name (void);
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* _PROGNAME_H */
diff --git a/gl/size_max.h b/gl/size_max.h
index ce2377b5cf..3bb87aee80 100644
--- a/gl/size_max.h
+++ b/gl/size_max.h
@@ -3,16 +3,16 @@
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/snprintf.c b/gl/snprintf.c
index 5870f8dde3..e019fcece7 100644
--- a/gl/snprintf.c
+++ b/gl/snprintf.c
@@ -3,16 +3,16 @@
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/snprintf.h b/gl/snprintf.h
index 5032b9e8f8..05831a374d 100644
--- a/gl/snprintf.h
+++ b/gl/snprintf.h
@@ -3,16 +3,16 @@
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/stdbool_.h b/gl/stdbool_.h
index 3177ae03cf..2d42f7c509 100644
--- a/gl/stdbool_.h
+++ b/gl/stdbool_.h
@@ -2,16 +2,16 @@
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index 324d62ecda..1e5ecd59ae 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -2,16 +2,16 @@
Copyright (C) 1999, 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h
index 894008caec..3ed5714471 100644
--- a/gl/vasnprintf.h
+++ b/gl/vasnprintf.h
@@ -2,16 +2,16 @@
Copyright (C) 2002-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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License along
+ You should have received a copy of the GNU Lesser 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. */
diff --git a/gl/xsize.h b/gl/xsize.h
index 341fb16ca7..65356bb6c1 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -3,16 +3,16 @@
Copyright (C) 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)
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, 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.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser 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. */