From: patthoyts Date: Sun, 27 Nov 2005 21:31:58 +0000 (+0000) Subject: * generic/udp_tcl.c: bug #1240127 - handle possible missing IP_TTL X-Git-Tag: tcludp-1_0_8~12 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=1b3c1618d84bbf94c9fa1f3a15358bcd742ee656;p=tcludp * generic/udp_tcl.c: bug #1240127 - handle possible missing IP_TTL * generic/udp_tcl.c: bug #1358181 - fix for NetBSD 2.0 * aclocal.m4: bug #1358189 - better method for finding dtplite * win/makefile.vc: Increment version to 1.0.8 * configure.in: * configure: regenerated --- diff --git a/ChangeLog b/ChangeLog index c8e3f64..82b94fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-27 Pat Thoyts + + * generic/udp_tcl.c: bug #1240127 - handle possible missing IP_TTL + * generic/udp_tcl.c: bug #1358181 - fix for NetBSD 2.0 + * aclocal.m4: bug #1358189 - better method for finding dtplite + * win/makefile.vc: Increment version to 1.0.8 + * configure.in: + * configure: regenerated + 2005-05-20 Pat Thoyts * TAG: ==== tcludp-1_0_7 ==== diff --git a/Makefile.in b/Makefile.in index 510b2b6..194e30a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -176,7 +176,7 @@ all: binaries libraries doc # of the Makefile, in the "BINARIES" variable. #======================================================================== -binaries: $(BINARIES) pkgIndex.tcl +binaries: $(BINARIES) pkgIndex.tcl-hand libraries: @@ -188,7 +188,7 @@ libraries: #======================================================================== DTPLITE=@DTPLITE@ -doc: +doc: udp.n udp.n: $(srcdir)/doc/udp.man test -x $(DTPLITE) && $(DTPLITE) -o $@ nroff $(srcdir)/doc/udp.man diff --git a/README b/README index 291e2c1..e403794 100644 --- a/README +++ b/README @@ -7,7 +7,7 @@ INSTALLATION ============ This package uses the Tcl Extension Architecture (TEA). Please see the -we page +web page http://www.tcl.tk/doc/tea/ diff --git a/aclocal.m4 b/aclocal.m4 index 231d88e..6f05de5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -8,8 +8,47 @@ builtin(include,tclconfig/tcl.m4) # Add here whatever m4 macros you want to define for your package # +#-------------------------------------------------------------------- +# TEA_ENABLE_INET6 +# +# Check for Internet Protocol v6 support. +# +# Adds a --enable-ipv6 option to the configure program and +# may define a new macro USE_INET6 +# +#-------------------------------------------------------------------- + +AC_DEFUN(TEA_ENABLE_INET6, [ + AC_MSG_CHECKING([for INET6 support]) + AC_ARG_ENABLE(inet6, [ --enable-ipv6 build with ipv6], + [inet6_ok=$enableval], [inet6_ok=no]) + AC_DEFINE(USE_INET6) + if test "$inet6_ok" = "yes" + then + AC_MSG_RESULT([yes]) + USE_INET6=1 + + AC_CHECK_LIB(c,getaddrinfo,[inet6_ok=yes],[inet6_ok=no]) + if test "$inet6_ok" = "yes" + then + #CFLAGS="$CFLAGS -DUSE_INET6" + TEA_ADD_CFLAGS([-DUSE_INET6]) + else + USE_INET6=no + AC_MSG_ERROR([Cannot find getaddrinfo() - inet6 support disabled]) + fi + + else + USE_INET6=0 + AC_MSG_RESULT([no (default)]) + fi + + AC_SUBST(USE_INET6) +]) + #------------------------------------------------------------------------- # TEA_PROG_DTPLITE +# # Do we have a usable dtplite program to use in document generation? # # Results @@ -18,13 +57,6 @@ builtin(include,tclconfig/tcl.m4) #------------------------------------------------------------------------- AC_DEFUN(TEA_PROG_DTPLITE, [ - AC_MSG_CHECKING([for dtplite]) - prog="`which dtplite`" - if test -x $prog; then - DTPLITE=$prog - AC_MSG_RESULT($DTPLITE) - else - AC_MSG_ERROR([No dtplite program found]) - fi - AC_SUBST(DTPLITE) -]) \ No newline at end of file + AC_PATH_TOOL([DTPLITE], [dtplite], [:]) +]) + diff --git a/configure b/configure index efef31d..5de00d9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for udp 1.0.7. +# Generated by GNU Autoconf 2.59 for udp 1.0.8. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation @@ -267,8 +267,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='udp' PACKAGE_TARNAME='udp' -PACKAGE_VERSION='1.0.7' -PACKAGE_STRING='udp 1.0.7' +PACKAGE_VERSION='1.0.8' +PACKAGE_STRING='udp 1.0.8' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR TCLSH_PROG CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB DTPLITE LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR TCLSH_PROG CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_CFLAGS SHLIB_LD_LIBS LDFLAGS_DEBUG LDFLAGS_OPTIMIZE LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB DTPLITE ac_pt_DTPLITE LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -777,7 +777,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures udp 1.0.7 to adapt to many kinds of systems. +\`configure' configures udp 1.0.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -834,7 +834,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of udp 1.0.7:";; + short | recursive ) echo "Configuration of udp 1.0.8:";; esac cat <<\_ACEOF @@ -963,7 +963,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -udp configure 1.0.7 +udp configure 1.0.8 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -977,7 +977,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by udp $as_me 1.0.7, which was +It was created by udp $as_me 1.0.8, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -10621,18 +10621,93 @@ echo "$as_me: error: No tclsh found in PATH: $search_path" >&2;} # ------------------------------------------------------------------- - echo "$as_me:$LINENO: checking for dtplite" >&5 -echo $ECHO_N "checking for dtplite... $ECHO_C" >&6 - prog="`which dtplite`" - if test -x $prog; then - DTPLITE=$prog - echo "$as_me:$LINENO: result: $DTPLITE" >&5 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dtplite", so it can be a program name with args. +set dummy ${ac_tool_prefix}dtplite; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_DTPLITE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $DTPLITE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DTPLITE="$DTPLITE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DTPLITE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +DTPLITE=$ac_cv_path_DTPLITE + +if test -n "$DTPLITE"; then + echo "$as_me:$LINENO: result: $DTPLITE" >&5 echo "${ECHO_T}$DTPLITE" >&6 - else - { { echo "$as_me:$LINENO: error: No dtplite program found" >&5 -echo "$as_me: error: No dtplite program found" >&2;} - { (exit 1); exit 1; }; } - fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_path_DTPLITE"; then + ac_pt_DTPLITE=$DTPLITE + # Extract the first word of "dtplite", so it can be a program name with args. +set dummy dtplite; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ac_pt_DTPLITE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_DTPLITE in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_DTPLITE="$ac_pt_DTPLITE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_DTPLITE="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_ac_pt_DTPLITE" && ac_cv_path_ac_pt_DTPLITE=":" + ;; +esac +fi +ac_pt_DTPLITE=$ac_cv_path_ac_pt_DTPLITE + +if test -n "$ac_pt_DTPLITE"; then + echo "$as_me:$LINENO: result: $ac_pt_DTPLITE" >&5 +echo "${ECHO_T}$ac_pt_DTPLITE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + DTPLITE=$ac_pt_DTPLITE +else + DTPLITE="$ac_cv_path_DTPLITE" +fi @@ -11036,7 +11111,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by udp $as_me 1.0.7, which was +This file was extended by udp $as_me 1.0.8, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -11091,7 +11166,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -udp config.status 1.0.7 +udp config.status 1.0.8 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -11348,6 +11423,7 @@ s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@RANLIB_STUB@,$RANLIB_STUB,;t t s,@DTPLITE@,$DTPLITE,;t t +s,@ac_pt_DTPLITE@,$ac_pt_DTPLITE,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.in b/configure.in index b057e3f..a38619b 100644 --- a/configure.in +++ b/configure.in @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([udp], [1.0.7]) +AC_INIT([udp], [1.0.8]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. diff --git a/doc/udp.man b/doc/udp.man index b5aa6d4..2d69487 100644 --- a/doc/udp.man +++ b/doc/udp.man @@ -3,7 +3,7 @@ script from tcllib: dtplite -o udp.n nroff udp.man dtplite -o udp.html html udp.man }] -[manpage_begin udp n 1.0.7] +[manpage_begin udp n 1.0.8] [copyright {1999-2000 Columbia University; all rights reserved}] [moddesc {Tcl UDP extension}] [titledesc {Create UDP sockets in Tcl}] diff --git a/generic/udp_tcl.c b/generic/udp_tcl.c index 90ccc75..815a7f4 100644 --- a/generic/udp_tcl.c +++ b/generic/udp_tcl.c @@ -22,9 +22,11 @@ typedef int socklen_t; #else /* ! WIN32 */ #if defined(HAVE_SYS_FILIO_H) #include -#elif defined(HAVE_SYS_IOCTL_H) +#endif +#if defined(HAVE_SYS_IOCTL_H) #include -#else +#endif +#if !defined(HAVE_SYS_FILIO_H) && !defined(HAVE_SYS_IOCTL_H) #error "Neither sys/ioctl.h nor sys/filio.h found. We need ioctl()" #endif #endif /* WIN32 */ @@ -34,6 +36,11 @@ typedef int socklen_t; #define CONST84 #endif +/* bug #1240127: May not be found on certain versions of mingw-gcc */ +#ifndef IP_TTL +#define IP_TTL 4 +#endif + /* define some Win32isms for Unix */ #ifndef WIN32 #define SOCKET int diff --git a/win/makefile.vc b/win/makefile.vc index 3420269..7857b0d 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -156,7 +156,7 @@ Please `cd` to its location first. PROJECT = udp !include "rules.vc" -DOTVERSION = 1.0.7 +DOTVERSION = 1.0.8 VERSION = $(DOTVERSION:.=) STUBPREFIX = $(PROJECT)stub