]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Removed some ancient non-used functions.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 22 Oct 2007 19:24:07 +0000 (22:24 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 22 Oct 2007 19:24:07 +0000 (22:24 +0300)
build-aux/config.rpath
lib/gnutls_buffers.c
lib/gnutls_record.c

index c547c68825fa9b588b67046e9982e721d70aea8e..c492a93b663132214cb5c26bfab04f111a9ff2bf 100755 (executable)
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2007 Free Software Foundation, Inc.
+#   Copyright 1996-2006 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
@@ -64,7 +64,7 @@ else
           ;;
       esac
       ;;
-    mingw* | cygwin* | pw32* | os2*)
+    mingw* | pw32* | os2*)
       ;;
     hpux9* | hpux10* | hpux11*)
       wl='-Wl,'
@@ -74,7 +74,7 @@ else
       ;;
     newsos6)
       ;;
-    linux* | k*bsd*-gnu)
+    linux*)
       case $cc_basename in
         icc* | ecc*)
           wl='-Wl,'
@@ -100,7 +100,7 @@ else
     osf3* | osf4* | osf5*)
       wl='-Wl,'
       ;;
-    rdos*)
+    sco3.2v5*)
       ;;
     solaris*)
       wl='-Wl,'
@@ -108,14 +108,11 @@ else
     sunos4*)
       wl='-Qoption ld '
       ;;
-    sysv4 | sysv4.2uw2* | sysv4.3*)
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
       wl='-Wl,'
       ;;
     sysv4*MP*)
       ;;
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      wl='-Wl,'
-      ;;
     unicos*)
       wl='-Wl,'
       ;;
@@ -192,11 +189,11 @@ if test "$with_gnu_ld" = yes; then
         ld_shlibs=no
       fi
       ;;
-    interix[3-9]*)
+    interix3*)
       hardcode_direct=no
       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       ;;
-    gnu* | linux* | k*bsd*-gnu)
+    linux*)
       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
         :
       else
@@ -283,7 +280,7 @@ else
             strings "$collect2name" | grep resolve_lib_name >/dev/null
           then
             # We have reworked collect2
-            :
+            hardcode_direct=yes
           else
             # We have old collect2
             hardcode_direct=unsupported
@@ -362,7 +359,7 @@ else
       hardcode_direct=yes
       hardcode_minus_L=yes
       ;;
-    freebsd* | dragonfly*)
+    freebsd* | kfreebsd*-gnu | dragonfly*)
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       ;;
@@ -415,22 +412,18 @@ else
       hardcode_libdir_separator=:
       ;;
     openbsd*)
-      if test -f /usr/libexec/ld.so; then
-        hardcode_direct=yes
-        if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-        else
-          case "$host_os" in
-            openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-              hardcode_libdir_flag_spec='-R$libdir'
-              ;;
-            *)
-              hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-              ;;
-          esac
-        fi
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
       else
-        ld_shlibs=no
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+            ;;
+        esac
       fi
       ;;
     os2*)
@@ -478,7 +471,7 @@ else
         ld_shlibs=yes
       fi
       ;;
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
       ;;
     sysv5* | sco3.2v5* | sco5v6*)
       hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
@@ -495,51 +488,33 @@ fi
 
 # Check dynamic linker characteristics
 # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec=      # the last element of library_names_spec in libtool.m4
 libname_spec='lib$name'
 case "$host_os" in
   aix3*)
-    library_names_spec='$libname.a'
     ;;
   aix4* | aix5*)
-    library_names_spec='$libname$shrext'
     ;;
   amigaos*)
-    library_names_spec='$libname.a'
     ;;
   beos*)
-    library_names_spec='$libname$shrext'
     ;;
   bsdi[45]*)
-    library_names_spec='$libname$shrext'
     ;;
   cygwin* | mingw* | pw32*)
     shrext=.dll
-    library_names_spec='$libname.dll.a $libname.lib'
     ;;
   darwin* | rhapsody*)
     shrext=.dylib
-    library_names_spec='$libname$shrext'
     ;;
   dgux*)
-    library_names_spec='$libname$shrext'
     ;;
   freebsd1*)
     ;;
+  kfreebsd*-gnu)
+    ;;
   freebsd* | dragonfly*)
-    case "$host_os" in
-      freebsd[123]*)
-        library_names_spec='$libname$shrext$versuffix' ;;
-      *)
-        library_names_spec='$libname$shrext' ;;
-    esac
     ;;
   gnu*)
-    library_names_spec='$libname$shrext'
     ;;
   hpux9* | hpux10* | hpux11*)
     case $host_cpu in
@@ -553,13 +528,10 @@ case "$host_os" in
         shrext=.sl
         ;;
     esac
-    library_names_spec='$libname$shrext'
     ;;
-  interix[3-9]*)
-    library_names_spec='$libname$shrext'
+  interix3*)
     ;;
   irix5* | irix6* | nonstopux*)
-    library_names_spec='$libname$shrext'
     case "$host_os" in
       irix5* | nonstopux*)
         libsuff= shlibsuff=
@@ -576,59 +548,41 @@ case "$host_os" in
     ;;
   linux*oldld* | linux*aout* | linux*coff*)
     ;;
-  linux* | k*bsd*-gnu)
-    library_names_spec='$libname$shrext'
+  linux*)
     ;;
   knetbsd*-gnu)
-    library_names_spec='$libname$shrext'
     ;;
   netbsd*)
-    library_names_spec='$libname$shrext'
     ;;
   newsos6)
-    library_names_spec='$libname$shrext'
     ;;
   nto-qnx*)
-    library_names_spec='$libname$shrext'
     ;;
   openbsd*)
-    library_names_spec='$libname$shrext$versuffix'
     ;;
   os2*)
     libname_spec='$name'
     shrext=.dll
-    library_names_spec='$libname.a'
     ;;
   osf3* | osf4* | osf5*)
-    library_names_spec='$libname$shrext'
-    ;;
-  rdos*)
     ;;
   solaris*)
-    library_names_spec='$libname$shrext'
     ;;
   sunos4*)
-    library_names_spec='$libname$shrext$versuffix'
     ;;
   sysv4 | sysv4.3*)
-    library_names_spec='$libname$shrext'
     ;;
   sysv4*MP*)
-    library_names_spec='$libname$shrext'
     ;;
   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-    library_names_spec='$libname$shrext'
     ;;
   uts4*)
-    library_names_spec='$libname$shrext'
     ;;
 esac
 
 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
 shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
 escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
 
 LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
@@ -642,12 +596,6 @@ libext="$libext"
 # Shared library suffix (normally "so").
 shlibext="$shlibext"
 
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
 # Flag to hardcode \$libdir into a binary during linking.
 # This must work even if \$libdir does not exist.
 hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
index 7d434caba1e669e94fd601752aa64a40a092efaf..2b8457540591a115d01ac96930dc4adf7aead8a6 100644 (file)
@@ -882,42 +882,6 @@ _gnutls_io_write_buffered (gnutls_session_t session,
 
 }
 
-/* This is exactly like write_buffered, but will use two buffers to read
- * from.
- */
-ssize_t
-_gnutls_io_write_buffered2 (gnutls_session_t session,
-                           const void *iptr, size_t n,
-                           const void *iptr2, size_t n2)
-{
-
-  if (n == 0)
-    {
-      return _gnutls_io_write_buffered (session, iptr2, n2);
-    }
-  else
-    {
-      opaque *sptr;
-      ssize_t ret;
-
-      sptr = gnutls_alloca (n + n2);
-      if (sptr == NULL)
-       {
-         gnutls_assert ();
-         return GNUTLS_E_MEMORY_ERROR;
-       }
-
-      memcpy (sptr, iptr, n);
-      memcpy (&sptr[n], iptr2, n2);
-
-      ret = _gnutls_io_write_buffered (session, sptr, n + n2);
-      gnutls_afree (sptr);
-
-      return ret;
-    }
-}
-
-
 /* This function writes the data that are left in the
  * TLS write buffer (ie. because the previous write was
  * interrupted.
index 0db66a91635c73c2835804747946d8ff3ecbaf7f..e94960afd56d2ea3ffcad311a3d97761e28d0374 100644 (file)
@@ -321,8 +321,6 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type,
   int data2send_size;
   uint8_t headers[5];
   const uint8_t *data = _data;
-  int erecord_size = 0;
-  opaque *erecord = NULL;
 
   /* Do not allow null pointer if the send buffer is empty.
    * If the previous send was interrupted then a null pointer is
@@ -342,8 +340,6 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type,
        return GNUTLS_E_INVALID_SESSION;
       }
 
-
-
   headers[0] = type;
 
   /* Use the default record version, if it is
@@ -393,13 +389,12 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type,
 
       cipher_size =
        _gnutls_encrypt (session, headers, RECORD_HEADER_SIZE, data,
-                        data2send_size, cipher, cipher_size, type, 1);
+                        data2send_size, cipher, cipher_size, type, 0);
       if (cipher_size <= 0)
        {
          gnutls_assert ();
          if (cipher_size == 0)
            cipher_size = GNUTLS_E_ENCRYPTION_FAILED;
-         gnutls_afree (erecord);
          gnutls_free (cipher);
          return cipher_size;   /* error */
        }
@@ -414,19 +409,16 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type,
        {
          session_invalidate (session);
          gnutls_assert ();
-         gnutls_afree (erecord);
          gnutls_free (cipher);
          return GNUTLS_E_RECORD_LIMIT_REACHED;
        }
 
       ret =
-       _gnutls_io_write_buffered2 (session, erecord, erecord_size,
-                                   cipher, cipher_size);
-      gnutls_afree (erecord);
+       _gnutls_io_write_buffered (session, cipher, cipher_size);
       gnutls_free (cipher);
     }
 
-  if (ret != cipher_size + erecord_size)
+  if (ret != cipher_size)
     {
       if (ret < 0 && gnutls_error_is_fatal (ret) == 0)
        {