summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-05-11 16:35:18 +0200
committerSimon Josefsson <simon@josefsson.org>2009-05-11 16:35:18 +0200
commit5f4ee26103816b53bdcb816411f039a61cc01764 (patch)
treeddc2e997a11647a638f737ca31c867546ef97b65
parent27b9d0422c0ead512e3dbe1a8776eee38ac06e53 (diff)
downloadgnutls-5f4ee26103816b53bdcb816411f039a61cc01764.tar.gz
Fix MinGW build failures.
-rw-r--r--NEWS2
-rw-r--r--doc/examples/Makefile.am11
-rw-r--r--lib/gl/Makefile.am2
-rw-r--r--lib/gl/m4/gnulib-cache.m44
-rw-r--r--lib/gl/m4/gnulib-comp.m42
-rw-r--r--lib/gl/tests/Makefile.am9
-rw-r--r--lib/gl/tests/test-lseek.c103
-rwxr-xr-xlib/gl/tests/test-lseek.sh17
-rw-r--r--src/Makefile.am6
-rw-r--r--tests/Makefile.am6
10 files changed, 19 insertions, 143 deletions
diff --git a/NEWS b/NEWS
index b31783a51d..f1fde85a42 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ See the end for copying conditions.
* Version 2.7.9 (unreleased)
+** Fix build failure when cross-compiled using MinGW.
+
** Fix build failure when LZO is enabled.
Reported by Arfrever Frehtes Taifersar Arahesis
<arfrever.fta@gmail.com> in
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 004af4020f..9cab8d4742 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation
#
# Author: Simon Josefsson
#
@@ -26,10 +26,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/gl -I$(top_builddir)/gl
AM_LDFLAGS = -no-install
-LDADD = libexamples.la \
- ../../lib/libgnutls.la \
- ../../libextra/libgnutls-extra.la \
- ../../gl/libgnu.la
+LDADD = libexamples.la \
+ ../../lib/libgnutls.la \
+ ../../libextra/libgnutls-extra.la \
+ ../../gl/libgnu.la \
+ $(LIBSOCKET)
CXX_LDADD = $(LDADD) \
../../lib/libgnutlsxx.la
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index d179c75d5b..ba19b7c9bf 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index 1a1547f588..92e965bca8 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=liblgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=lseek-tests --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files byteswap c-ctype fseeko func gettext memmem-simple memmove minmax netdb read-file snprintf sockets socklen stdint strcase strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -42,7 +42,7 @@ gl_MODULES([
unistd
vasprintf
])
-gl_AVOID([])
+gl_AVOID([lseek-tests])
gl_SOURCE_BASE([gl])
gl_M4_BASE([gl/m4])
gl_PO_BASE([])
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index 9b873f41dd..ebe8e4b5e0 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -362,8 +362,6 @@ AC_DEFUN([lgl_FILE_LIST], [
tests/test-fseeko.sh
tests/test-fseeko2.sh
tests/test-func.c
- tests/test-lseek.c
- tests/test-lseek.sh
tests/test-netdb.c
tests/test-read-file.c
tests/test-snprintf.c
diff --git a/lib/gl/tests/Makefile.am b/lib/gl/tests/Makefile.am
index 8aad090943..c6791747fa 100644
--- a/lib/gl/tests/Makefile.am
+++ b/lib/gl/tests/Makefile.am
@@ -102,15 +102,6 @@ EXTRA_DIST += intprops.h
## end gnulib module intprops
-## begin gnulib module lseek-tests
-
-TESTS += test-lseek.sh
-TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
-check_PROGRAMS += test-lseek
-EXTRA_DIST += test-lseek.c test-lseek.sh
-
-## end gnulib module lseek-tests
-
## begin gnulib module netdb-tests
TESTS += test-netdb
diff --git a/lib/gl/tests/test-lseek.c b/lib/gl/tests/test-lseek.c
deleted file mode 100644
index ebba02ec6d..0000000000
--- a/lib/gl/tests/test-lseek.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* Test of lseek() function.
- Copyright (C) 2007-2008 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Eric Blake, 2007. */
-
-#include <config.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
-/* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1'
- if they are pipes, and '2' if they are closed. Check for proper
- semantics of lseek. */
-int
-main (int argc, char **argv)
-{
- if (argc != 2)
- return 2;
- switch (*argv[1])
- {
- case '0': /* regular files */
- ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2);
- ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1);
- ASSERT (errno == EINVAL);
- errno = 0;
-#if ! defined __BEOS__
- /* POSIX says that the last lseek call, when failing, does not change
- the current offset. But BeOS sets it to 0. */
- ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2);
-#endif
-#if 0 /* leads to SIGSYS on IRIX 6.5 */
- ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
- ASSERT (errno == EINVAL);
-#endif
- ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2);
- errno = 0;
- ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1);
- ASSERT (errno == EINVAL);
- errno = 0;
-#if ! defined __BEOS__
- /* POSIX says that the last lseek call, when failing, does not change
- the current offset. But BeOS sets it to 0. */
- ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2);
-#endif
-#if 0 /* leads to SIGSYS on IRIX 6.5 */
- ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
- ASSERT (errno == EINVAL);
-#endif
- break;
-
- case '1': /* pipes */
- errno = 0;
- ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
- ASSERT (errno == ESPIPE);
- errno = 0;
- ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
- ASSERT (errno == ESPIPE);
- break;
-
- case '2': /* closed */
- /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the
- invoking shell are not enough on HP-UX. */
- close (0);
- close (1);
- errno = 0;
- ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
- ASSERT (errno == EBADF);
- errno = 0;
- ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
- ASSERT (errno == EBADF);
- break;
-
- default:
- return 1;
- }
- return 0;
-}
diff --git a/lib/gl/tests/test-lseek.sh b/lib/gl/tests/test-lseek.sh
deleted file mode 100755
index e84c2bb493..0000000000
--- a/lib/gl/tests/test-lseek.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-tmpfiles=
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
-tmpfiles=t-lseek.tmp
-# seekable files
-./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
-
-# pipes
-echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1
-
-# closed descriptors
-./test-lseek${EXEEXT} 2 <&- >&- || exit 1
-
-rm -rf $tmpfiles
-exit 0
diff --git a/src/Makefile.am b/src/Makefile.am
index 90dea994f1..f8fe9f932e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,7 +42,7 @@ noinst_LTLIBRARIES =
gnutls_serv_SOURCES = list.h serv.c common.h common.c certtool-common.h
gnutls_serv_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la
-gnutls_serv_LDADD += libcmd-serv.la ../gl/libgnu.la
+gnutls_serv_LDADD += libcmd-serv.la ../gl/libgnu.la $(LIBSOCKET)
noinst_LTLIBRARIES += libcmd-serv.la
libcmd_serv_la_CFLAGS =
libcmd_serv_la_SOURCES = serv.gaa serv-gaa.h serv-gaa.c
@@ -63,14 +63,14 @@ libcmd_psk_la_SOURCES = psk.gaa psk-gaa.h psk-gaa.c
gnutls_cli_SOURCES = cli.c common.h common.c
gnutls_cli_LDADD = ../lib/libgnutls.la ../libextra/libgnutls-extra.la
-gnutls_cli_LDADD += libcmd-cli.la ../gl/libgnu.la
+gnutls_cli_LDADD += libcmd-cli.la ../gl/libgnu.la $(LIBSOCKET)
noinst_LTLIBRARIES += libcmd-cli.la
libcmd_cli_la_CFLAGS =
libcmd_cli_la_SOURCES = cli.gaa cli-gaa.h cli-gaa.c
gnutls_cli_debug_SOURCES = tls_test.c tests.h tests.c common.h common.c
gnutls_cli_debug_LDADD = ../lib/libgnutls.la libcmd-cli-debug.la
-gnutls_cli_debug_LDADD += ../gl/libgnu.la
+gnutls_cli_debug_LDADD += ../gl/libgnu.la $(LIBSOCKET)
noinst_LTLIBRARIES += libcmd-cli-debug.la
libcmd_cli_debug_la_CFLAGS =
libcmd_cli_debug_la_SOURCES = tls_test.gaa tls_test-gaa.h tls_test-gaa.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d49f60b408..d787a108cd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -40,7 +40,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/doc/examples
AM_LDFLAGS = -no-install
-LDADD = ../lib/libgnutls.la ../gl/libgnu.la libutils.la $(LTLIBGCRYPT)
+LDADD = ../lib/libgnutls.la \
+ ../gl/libgnu.la \
+ libutils.la \
+ $(LTLIBGCRYPT) \
+ $(LIBSOCKET)
if ENABLE_MINITASN1
AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1