]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update.
authorSimon Josefsson <simon@josefsson.org>
Wed, 1 Mar 2006 10:01:11 +0000 (10:01 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 1 Mar 2006 10:01:11 +0000 (10:01 +0000)
gl/m4/readline.m4
gl/m4/socklen.m4
gl/m4/sys_socket_h.m4
gl/readline.c
maint.mk

index 8c2d9d243e12c648973db1c62bb25799b87537c8..abe7dcc7d6237d4e3c606506626b609e65d9818b 100644 (file)
@@ -1,5 +1,5 @@
-# readline.m4 serial 3
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# readline.m4 serial 4
+dnl Copyright (C) 2005, 2006 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.
@@ -42,23 +42,18 @@ AC_DEFUN([gl_FUNC_READLINE],
       AC_TRY_LINK([#include <stdio.h>
 #include <readline/readline.h>],
         [readline((char*)0);],
-        gl_cv_lib_readline=yes)
-      if test "$gl_cv_lib_readline" = yes; then
-        if test -n "$extra_lib"; then
-          LIBREADLINE="$LIBREADLINE -l$extra_lib"
-          LTLIBREADLINE="$LTLIBREADLINE -l$extra_lib"
-        fi
-        break
+        [gl_cv_lib_readline=" -l$extra_lib"])
+      if test "$gl_cv_lib_readline" != no; then
+       break
       fi
     done
     LIBS="$am_save_LIBS"
   ])
 
-  if test "$gl_cv_lib_readline" = yes; then
+  if test "$gl_cv_lib_readline" != no; then
     AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline library.])
-  fi
-
-  if test "$gl_cv_lib_readline" = yes; then
+    LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
+    LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"
     AC_MSG_CHECKING([how to link with libreadline])
     AC_MSG_RESULT([$LIBREADLINE])
   else
index 01da2b547638b73ae22ad62bf23e8047822ad949..5e3765a64bf0fc3e2da68259a3fcdb1e137cbaa3 100644 (file)
@@ -1,4 +1,4 @@
-# socklen.m4 serial 3
+# socklen.m4 serial 4
 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,40 +13,40 @@ dnl have to test to find something that will work.
 
 dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
 dnl it there first.  That file is included by gnulib's socket_.h, which
-dnl all users of this module should include.
+dnl all users of this module should include.  Cygwin must not include
+dnl ws2tcpip.h.
 AC_DEFUN([gl_TYPE_SOCKLEN_T],
-  [AC_CHECK_HEADERS_ONCE([sys/socket.h ws2tcpip.h])
+  [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl
    AC_CHECK_TYPE([socklen_t], ,
      [AC_MSG_CHECKING([for socklen_t equivalent])
       AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv],
-        [# Systems have either "struct sockaddr *" or
-         # "void *" as the second argument to getpeername
-         gl_cv_socklen_t_equiv=
-         for arg2 in "struct sockaddr" void; do
+       [# Systems have either "struct sockaddr *" or
+        # "void *" as the second argument to getpeername
+        gl_cv_socklen_t_equiv=
+        for arg2 in "struct sockaddr" void; do
           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
             AC_TRY_COMPILE(
               [#include <sys/types.h>
-                #include <sys/socket.h>
+               #include <sys/socket.h>
 
                int getpeername (int, $arg2 *, $t *);],
-               [$t len;
+              [$t len;
                getpeername (0, 0, &len);],
               [gl_cv_socklen_t_equiv="$t"])
-             test "$gl_cv_socklen_t_equiv" != "" && break
+            test "$gl_cv_socklen_t_equiv" != "" && break
           done
-           test "$gl_cv_socklen_t_equiv" != "" && break
-         done
+          test "$gl_cv_socklen_t_equiv" != "" && break
+        done
       ])
       if test "$gl_cv_socklen_t_equiv" = ""; then
        AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
       fi
       AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
       AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
-        [type to use in place of socklen_t if not defined])],
+       [type to use in place of socklen_t if not defined])],
      [#include <sys/types.h>
       #if HAVE_SYS_SOCKET_H
       # include <sys/socket.h>
-      #endif
-      #if HAVE_WS2TCPIP_H
+      #elif HAVE_WS2TCPIP_H
       # include <ws2tcpip.h>
       #endif])])
index 10d042c321446ef450e779fad5b4a55bf87c8a86..d3e45b48c1500018186bd193e765d2f07dae625a 100644 (file)
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 1
+# sys_socket_h.m4 serial 2
 dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,11 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
   if test $ac_cv_header_sys_socket_h = yes; then
     SYS_SOCKET_H=''
   else
-    AC_CHECK_HEADERS_ONCE([winsock2.h ws2tcpip.h])
+    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+    dnl the check for those headers unconditional; yet cygwin reports
+    dnl that the headers are present but cannot be compiled (since on
+    dnl cygwin, all socket information should come from sys/socket.h).
+    AC_CHECK_HEADERS([winsock2.h ws2tcpip.h])
     SYS_SOCKET_H='sys/socket.h'
   fi
   AC_SUBST(SYS_SOCKET_H)
index 3b27f6358240d7739cff41baf504f4c4ec1a58a5..07a94fd30d1b6f2330778a35169336f15a73e5aa 100644 (file)
@@ -1,5 +1,5 @@
 /* readline.c --- Simple implementation of readline.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    Written by Simon Josefsson
 
    This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,7 @@
 # include <config.h>
 #endif
 
-/* This module is intended to be used when the application only need
+/* This module is intended to be used when the application only needs
    the readline interface.  If you need more functions from the
    readline library, it is recommended to require the readline library
    (or improve this module) rather than #if-protect part of your
index be933983bc9d1b1ab9f1ff5a342c24602a4f0d5f..b5ae6d78b90ab5d91a66f588689c8d2b3dff3249 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -19,6 +19,8 @@
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+ME := maint.mk
+
 # List of all C-like source code files that will be tested for
 # stylistic "errors".  You may want to define this to something 
 # more complex in Makefile.cfg.
@@ -42,3 +44,9 @@ sc_cast_of_argument_to_free:
        @grep -nE '\<free *\( *\(' $(C_SOURCES) &&              \
          { echo '$(ME): don'\''t cast free argument' 1>&2;             \
            exit 1; } || :
+
+# Collect the names of rules starting with `sc_'.
+syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
+.PHONY: $(syntax-check-rules)
+
+syntax-check: $(syntax-check-rules)