summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2006-01-11 19:42:08 +0000
committerSimon Josefsson <simon@josefsson.org>2006-01-11 19:42:08 +0000
commita40266b5ff06ecaabf25f1e8781fb57015cbe459 (patch)
treefeeeaf5a6efc8b4cb1ede7264f402721815a744f
parent7d006472717c1720e536636e99219789f6a600f5 (diff)
downloadgnutls-a40266b5ff06ecaabf25f1e8781fb57015cbe459.tar.gz
Update.
-rw-r--r--gl/Makefile.am7
-rw-r--r--gl/dummy.c30
-rw-r--r--gl/m4/gnulib-comp.m41
-rw-r--r--gl/m4/readline.m49
-rw-r--r--gl/sha1.c4
-rw-r--r--gl/stdint_.h2
6 files changed, 48 insertions, 5 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 3b4136185b..c2d4a107c0 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -16,6 +16,7 @@ noinst_LTLIBRARIES = libgnu.la
libgnu_la_SOURCES =
libgnu_la_LIBADD = @LTLIBOBJS@
+noinst_HEADERS =
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
@@ -118,5 +119,11 @@ libgnu_la_SOURCES += xsize.h
## end gnulib module xsize
+## begin gnulib module dummy
+
+libgnu_la_SOURCES += dummy.c
+
+## end gnulib module dummy
+
# Makefile.am ends here
diff --git a/gl/dummy.c b/gl/dummy.c
new file mode 100644
index 0000000000..df147e4778
--- /dev/null
+++ b/gl/dummy.c
@@ -0,0 +1,30 @@
+/* A dummy file, to prevent empty libraries from breaking builds.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+ 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. */
+
+/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
+ libraries without any object files. You might get an error like:
+
+ > ar cru .libs/libgl.a
+ > ar: no archive members specified
+
+ Compiling this file, and adding its object file to the library, will
+ prevent the library from being empty. */
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index f860521ad1..ea09cc58d7 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -71,6 +71,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/asnprintf.c
lib/des.c
lib/des.h
+ lib/dummy.c
lib/gc-gnulib.c
lib/gc-libgcrypt.c
lib/gc-pbkdf2-sha1.c
diff --git a/gl/m4/readline.m4 b/gl/m4/readline.m4
index 3082d1bf6d..8c2d9d243e 100644
--- a/gl/m4/readline.m4
+++ b/gl/m4/readline.m4
@@ -1,4 +1,4 @@
-# readline.m4 serial 2
+# readline.m4 serial 3
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,12 @@ AC_DEFUN([gl_FUNC_READLINE],
AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [
gl_cv_lib_readline=no
am_save_LIBS="$LIBS"
- for extra_lib in "" termcap curses ncurses; do
+ dnl On some systems, -lreadline doesn't link without an additional
+ dnl -lncurses or -ltermcap.
+ dnl Try -lncurses before -ltermcap, because libtermcap is unsecure
+ dnl by design and obsolete since 1994. Try -lcurses last, because
+ dnl libcurses is unusable on some old Unices.
+ for extra_lib in "" ncurses termcap curses; do
LIBS="$am_save_LIBS $LIBREADLINE"
if test -n "$extra_lib"; then
LIBS="$LIBS -l$extra_lib"
diff --git a/gl/sha1.c b/gl/sha1.c
index 7339540e27..7bc0ba9c45 100644
--- a/gl/sha1.c
+++ b/gl/sha1.c
@@ -77,7 +77,7 @@ sha1_init_ctx (struct sha1_ctx *ctx)
must be in little endian byte order.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
{
@@ -94,7 +94,7 @@ sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
prolog according to the standard and write the result to RESBUF.
IMPORTANT: On some systems it is required that RESBUF is correctly
- aligned for a 32 bits value. */
+ aligned for a 32-bit value. */
void *
sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
{
diff --git a/gl/stdint_.h b/gl/stdint_.h
index 2e239b0937..91e9a73d5f 100644
--- a/gl/stdint_.h
+++ b/gl/stdint_.h
@@ -245,7 +245,7 @@ typedef uint32_t uintmax_t;
#define SIG_ATOMIC_MAX 127
#ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
-# define SIZE_MAX (size_t)~(size_t)0)
+# define SIZE_MAX ((size_t)~(size_t)0)
#endif
/* wchar_t limits already defined in <stddef.h>. */