This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 9822 for ps


Ignore:
Timestamp:
07/14/11 23:29:13 (13 years ago)
Author:
philip
Message:

Upgrade ENet source to 1.3.3

Location:
ps/trunk/libraries/enet
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/libraries/enet/build.sh

    r9767 r9822  
    1616cd ../
    1717
     18mkdir -p lib/
     19
    1820if [ "`uname -s`" = "Darwin" ]
    1921then
  • ps/trunk/libraries/enet/include/enet/enet.h

    r9574 r9822  
    2626#define ENET_VERSION_MAJOR 1
    2727#define ENET_VERSION_MINOR 3
    28 #define ENET_VERSION_PATCH 1
     28#define ENET_VERSION_PATCH 3
    2929#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
    3030#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
     
    9797   ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1),
    9898   /** packet will not allocate data, and user must supply it instead */
    99    ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2)
     99   ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2),
     100   /** packet will be fragmented using unreliable (instead of reliable) sends
     101     * if it exceeds the MTU */
     102   ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3)
    100103} ENetPacketFlag;
    101104
     
    219222   enet_uint16  reliableWindows [ENET_PEER_RELIABLE_WINDOWS];
    220223   enet_uint16  incomingReliableSequenceNumber;
     224   enet_uint16  incomingUnreliableSequenceNumber;
    221225   ENetList     incomingReliableCommands;
    222226   ENetList     incomingUnreliableCommands;
  • ps/trunk/libraries/enet/include/enet/protocol.h

    r9574 r9822  
    3434   ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT    = 10,
    3535   ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11,
    36    ENET_PROTOCOL_COMMAND_COUNT              = 12,
     36   ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12,
     37   ENET_PROTOCOL_COMMAND_COUNT              = 13,
    3738
    3839   ENET_PROTOCOL_COMMAND_MASK               = 0x0F
  • ps/trunk/libraries/enet/src/ChangeLog

    r9573 r9822  
     1ENet 1.3.3 (June 28, 2011):
     2
     3* fixed bug with simultaneous disconnects not dispatching events
     4
     5ENet 1.3.2 (May 31, 2011):
     6
     7* added support for unreliable packet fragmenting via the packet flag
     8ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT
     9* fixed regression in unreliable packet queuing
     10* added check against received port to limit some forms of IP-spoofing
     11
    112ENet 1.3.1 (February 10, 2011):
    213
     
    2132earlier. The enet_host_connect and enet_host_create API functions require
    2233supplying additional parameters.
     34
     35ENet 1.2.5 (June 28, 2011):
     36
     37* fixed bug with simultaneous disconnects not dispatching events
     38
     39ENet 1.2.4 (May 31, 2011):
     40
     41* fixed regression in unreliable packet queuing
     42* added check against received port to limit some forms of IP-spoofing
     43
     44ENet 1.2.3 (February 10, 2011):
     45
     46* fixed bug in tracking reliable data in transit
    2347
    2448ENet 1.2.2 (June 5, 2010):
  • ps/trunk/libraries/enet/src/Makefile.am

    r9573 r9822  
    1717libenet_la_SOURCES = callbacks.c compress.c host.c list.c packet.c peer.c protocol.c unix.c win32.c
    1818# see info '(libtool) Updating version info' before making a release
    19 libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:1:0
     19libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:3:0
    2020INCLUDES = -Iinclude
    2121
  • ps/trunk/libraries/enet/src/Makefile.in

    r9573 r9822  
    243243libenet_la_SOURCES = callbacks.c compress.c host.c list.c packet.c peer.c protocol.c unix.c win32.c
    244244# see info '(libtool) Updating version info' before making a release
    245 libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:1:0
     245libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:3:0
    246246INCLUDES = -Iinclude
    247247ACLOCAL_AMFLAGS = -Im4
  • ps/trunk/libraries/enet/src/aclocal.m4

    r9573 r9822  
    1414m4_ifndef([AC_AUTOCONF_VERSION],
    1515  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
    17 [m4_warning([this file was generated for autoconf 2.67.
     16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
     17[m4_warning([this file was generated for autoconf 2.65.
    1818You have another version of autoconf.  It may work, but is not guaranteed to.
    1919If you have problems, you may need to regenerate the build system entirely.
    2020To do so, use the procedure documented by the package, typically `autoreconf'.])])
     21
     22# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
     23#
     24#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
     25#   Written by Scott James Remnant, 2004.
     26#
     27# This file is free software; the Free Software Foundation gives
     28# unlimited permission to copy and/or distribute it, with or without
     29# modifications, as long as this notice is preserved.
     30
     31# serial 5 lt~obsolete.m4
     32
     33# These exist entirely to fool aclocal when bootstrapping libtool.
     34#
     35# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
     36# which have later been changed to m4_define as they aren't part of the
     37# exported API, or moved to Autoconf or Automake where they belong.
     38#
     39# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
     40# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
     41# using a macro with the same name in our local m4/libtool.m4 it'll
     42# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
     43# and doesn't know about Autoconf macros at all.)
     44#
     45# So we provide this file, which has a silly filename so it's always
     46# included after everything else.  This provides aclocal with the
     47# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
     48# because those macros already exist, or will be overwritten later.
     49# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
     50#
     51# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
     52# Yes, that means every name once taken will need to remain here until
     53# we give up compatibility with versions before 1.7, at which point
     54# we need to keep only those names which we still refer to.
     55
     56# This is to help aclocal find these macros, as it can't see m4_define.
     57AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
     58
     59m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
     60m4_ifndef([AC_PROG_EGREP],      [AC_DEFUN([AC_PROG_EGREP])])
     61m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
     62m4_ifndef([_LT_AC_SHELL_INIT],      [AC_DEFUN([_LT_AC_SHELL_INIT])])
     63m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
     64m4_ifndef([_LT_PROG_LTMAIN],        [AC_DEFUN([_LT_PROG_LTMAIN])])
     65m4_ifndef([_LT_AC_TAGVAR],      [AC_DEFUN([_LT_AC_TAGVAR])])
     66m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
     67m4_ifndef([AC_LTDL_PREOPEN],        [AC_DEFUN([AC_LTDL_PREOPEN])])
     68m4_ifndef([_LT_AC_SYS_COMPILER],    [AC_DEFUN([_LT_AC_SYS_COMPILER])])
     69m4_ifndef([_LT_AC_LOCK],        [AC_DEFUN([_LT_AC_LOCK])])
     70m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
     71m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
     72m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
     73m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
     74m4_ifndef([AC_LIBTOOL_OBJDIR],      [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
     75m4_ifndef([AC_LTDL_OBJDIR],     [AC_DEFUN([AC_LTDL_OBJDIR])])
     76m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
     77m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
     78m4_ifndef([AC_PATH_MAGIC],      [AC_DEFUN([AC_PATH_MAGIC])])
     79m4_ifndef([AC_PROG_LD_GNU],     [AC_DEFUN([AC_PROG_LD_GNU])])
     80m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
     81m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
     82m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
     83m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
     84m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
     85m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
     86m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
     87m4_ifndef([LT_AC_PROG_EGREP],       [AC_DEFUN([LT_AC_PROG_EGREP])])
     88m4_ifndef([LT_AC_PROG_SED],     [AC_DEFUN([LT_AC_PROG_SED])])
     89m4_ifndef([_LT_CC_BASENAME],        [AC_DEFUN([_LT_CC_BASENAME])])
     90m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
     91m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
     92m4_ifndef([_AC_PROG_LIBTOOL],       [AC_DEFUN([_AC_PROG_LIBTOOL])])
     93m4_ifndef([AC_LIBTOOL_SETUP],       [AC_DEFUN([AC_LIBTOOL_SETUP])])
     94m4_ifndef([_LT_AC_CHECK_DLFCN],     [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
     95m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],  [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
     96m4_ifndef([_LT_AC_TAGCONFIG],       [AC_DEFUN([_LT_AC_TAGCONFIG])])
     97m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
     98m4_ifndef([_LT_AC_LANG_CXX],        [AC_DEFUN([_LT_AC_LANG_CXX])])
     99m4_ifndef([_LT_AC_LANG_F77],        [AC_DEFUN([_LT_AC_LANG_F77])])
     100m4_ifndef([_LT_AC_LANG_GCJ],        [AC_DEFUN([_LT_AC_LANG_GCJ])])
     101m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
     102m4_ifndef([_LT_AC_LANG_C_CONFIG],   [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
     103m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
     104m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
     105m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
     106m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
     107m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
     108m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
     109m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
     110m4_ifndef([_LT_AC_LANG_RC_CONFIG],  [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
     111m4_ifndef([AC_LIBTOOL_CONFIG],      [AC_DEFUN([AC_LIBTOOL_CONFIG])])
     112m4_ifndef([_LT_AC_FILE_LTDLL_C],    [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
     113m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
     114m4_ifndef([_LT_AC_PROG_CXXCPP],     [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
     115m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
     116m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
     117m4_ifndef([_LT_PROG_F77],       [AC_DEFUN([_LT_PROG_F77])])
     118m4_ifndef([_LT_PROG_FC],        [AC_DEFUN([_LT_PROG_FC])])
     119m4_ifndef([_LT_PROG_CXX],       [AC_DEFUN([_LT_PROG_CXX])])
    21120
    22121# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
  • ps/trunk/libraries/enet/src/configure

    r9573 r9822  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.67 for libenet 1.3.1.
     3# Generated by GNU Autoconf 2.65 for libenet 1.3.3.
    44#
    55#
    66# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
    7 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
    8 # Foundation, Inc.
     7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
     8# Inc.
    99#
    1010#
     
    317317    done
    318318    test -z "$as_dirs" || eval "mkdir $as_dirs"
    319   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
     319  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
    320320
    321321
     
    357357
    358358
    359 # as_fn_error STATUS ERROR [LINENO LOG_FD]
    360 # ----------------------------------------
     359# as_fn_error ERROR [LINENO LOG_FD]
     360# ---------------------------------
    361361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
    362362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
    363 # script with STATUS, using 1 if that was 0.
     363# script with status $?, using 1 if that was 0.
    364364as_fn_error ()
    365365{
    366   as_status=$1; test $as_status -eq 0 && as_status=1
    367   if test "$4"; then
    368     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    369     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
     366  as_status=$?; test $as_status -eq 0 && as_status=1
     367  if test "$3"; then
     368    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     369    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
    370370  fi
    371   $as_echo "$as_me: error: $2" >&2
     371  $as_echo "$as_me: error: $1" >&2
    372372  as_fn_exit $as_status
    373373} # as_fn_error
     
    680680
    681681# Name of the host.
    682 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
     682# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
    683683# so uname gets run too.
    684684ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
     
    699699PACKAGE_NAME='libenet'
    700700PACKAGE_TARNAME='libenet'
    701 PACKAGE_VERSION='1.3.1'
    702 PACKAGE_STRING='libenet 1.3.1'
     701PACKAGE_VERSION='1.3.3'
     702PACKAGE_STRING='libenet 1.3.3'
    703703PACKAGE_BUGREPORT=''
    704704PACKAGE_URL=''
     
    932932
    933933  case $ac_option in
    934   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
    935   *=)   ac_optarg= ;;
    936   *)    ac_optarg=yes ;;
     934  *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
     935  *)    ac_optarg=yes ;;
    937936  esac
    938937
     
    979978    # Reject names that are not valid shell variable names.
    980979    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    981       as_fn_error $? "invalid feature name: $ac_useropt"
     980      as_fn_error "invalid feature name: $ac_useropt"
    982981    ac_useropt_orig=$ac_useropt
    983982    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    10051004    # Reject names that are not valid shell variable names.
    10061005    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    1007       as_fn_error $? "invalid feature name: $ac_useropt"
     1006      as_fn_error "invalid feature name: $ac_useropt"
    10081007    ac_useropt_orig=$ac_useropt
    10091008    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    12091208    # Reject names that are not valid shell variable names.
    12101209    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    1211       as_fn_error $? "invalid package name: $ac_useropt"
     1210      as_fn_error "invalid package name: $ac_useropt"
    12121211    ac_useropt_orig=$ac_useropt
    12131212    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    12251224    # Reject names that are not valid shell variable names.
    12261225    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
    1227       as_fn_error $? "invalid package name: $ac_useropt"
     1226      as_fn_error "invalid package name: $ac_useropt"
    12281227    ac_useropt_orig=$ac_useropt
    12291228    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     
    12551254    x_libraries=$ac_optarg ;;
    12561255
    1257   -*) as_fn_error $? "unrecognized option: \`$ac_option'
    1258 Try \`$0 --help' for more information"
     1256  -*) as_fn_error "unrecognized option: \`$ac_option'
     1257Try \`$0 --help' for more information."
    12591258    ;;
    12601259
     
    12641263    case $ac_envvar in #(
    12651264      '' | [0-9]* | *[!_$as_cr_alnum]* )
    1266       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     1265      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
    12671266    esac
    12681267    eval $ac_envvar=\$ac_optarg
     
    12821281if test -n "$ac_prev"; then
    12831282  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
    1284   as_fn_error $? "missing argument to $ac_option"
     1283  as_fn_error "missing argument to $ac_option"
    12851284fi
    12861285
     
    12881287  case $enable_option_checking in
    12891288    no) ;;
    1290     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     1289    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
    12911290    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
    12921291  esac
     
    13111310    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
    13121311  esac
    1313   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
     1312  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
    13141313done
    13151314
     
    13251324  if test "x$build_alias" = x; then
    13261325    cross_compiling=maybe
    1327     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
    1328     If a cross compiler is detected then cross compile mode will be used" >&2
     1326    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
     1327    If a cross compiler is detected then cross compile mode will be used." >&2
    13291328  elif test "x$build_alias" != "x$host_alias"; then
    13301329    cross_compiling=yes
     
    13411340ac_ls_di=`ls -di .` &&
    13421341ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
    1343   as_fn_error $? "working directory cannot be determined"
     1342  as_fn_error "working directory cannot be determined"
    13441343test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
    1345   as_fn_error $? "pwd does not report name of working directory"
     1344  as_fn_error "pwd does not report name of working directory"
    13461345
    13471346
     
    13821381if test ! -r "$srcdir/$ac_unique_file"; then
    13831382  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
    1384   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
     1383  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
    13851384fi
    13861385ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
    13871386ac_abs_confdir=`(
    1388     cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
     1387    cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
    13891388    pwd)`
    13901389# When building in place, set srcdir=.
     
    14121411  # This message is too long to be a string in the A/UX 3.1 sh.
    14131412  cat <<_ACEOF
    1414 \`configure' configures libenet 1.3.1 to adapt to many kinds of systems.
     1413\`configure' configures libenet 1.3.3 to adapt to many kinds of systems.
    14151414
    14161415Usage: $0 [OPTION]... [VAR=VALUE]...
     
    14261425      --help=recursive    display the short help of all the included packages
    14271426  -V, --version           display version information and exit
    1428   -q, --quiet, --silent   do not print \`checking ...' messages
     1427  -q, --quiet, --silent   do not print \`checking...' messages
    14291428      --cache-file=FILE   cache test results in FILE [disabled]
    14301429  -C, --config-cache      alias for \`--cache-file=config.cache'
     
    14821481if test -n "$ac_init_help"; then
    14831482  case $ac_init_help in
    1484      short | recursive ) echo "Configuration of libenet 1.3.1:";;
     1483     short | recursive ) echo "Configuration of libenet 1.3.3:";;
    14851484   esac
    14861485  cat <<\_ACEOF
     
    15811580if $ac_init_version; then
    15821581  cat <<\_ACEOF
    1583 libenet configure 1.3.1
    1584 generated by GNU Autoconf 2.67
    1585 
    1586 Copyright (C) 2010 Free Software Foundation, Inc.
     1582libenet configure 1.3.3
     1583generated by GNU Autoconf 2.65
     1584
     1585Copyright (C) 2009 Free Software Foundation, Inc.
    15871586This configure script is free software; the Free Software Foundation
    15881587gives unlimited permission to copy, distribute and modify it.
     
    16881687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    16891688$as_echo_n "checking for $2... " >&6; }
    1690 if eval "test \"\${$3+set}\"" = set; then :
     1689if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
    16911690  $as_echo_n "(cached) " >&6
    16921691else
     
    17311730  fi
    17321731  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
    1733   test $ac_status = 0; } > conftest.i && {
     1732  test $ac_status = 0; } >/dev/null && {
    17341733     test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
    17351734     test ! -s conftest.err
     
    17971796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    17981797$as_echo_n "checking for $2... " >&6; }
    1799 if eval "test \"\${$3+set}\"" = set; then :
     1798if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
    18001799  $as_echo_n "(cached) " >&6
    18011800else
     
    18651864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
    18661865$as_echo_n "checking for $2.$3... " >&6; }
    1867 if eval "test \"\${$4+set}\"" = set; then :
     1866if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
    18681867  $as_echo_n "(cached) " >&6
    18691868else
     
    19221921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
    19231922$as_echo_n "checking for $2... " >&6; }
    1924 if eval "test \"\${$3+set}\"" = set; then :
     1923if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
    19251924  $as_echo_n "(cached) " >&6
    19261925else
     
    19701969running configure, to aid debugging if configure makes a mistake.
    19711970
    1972 It was created by libenet $as_me 1.3.1, which was
    1973 generated by GNU Autoconf 2.67.  Invocation command line was
     1971It was created by libenet $as_me 1.3.3, which was
     1972generated by GNU Autoconf 2.65.  Invocation command line was
    19741973
    19751974  $ $0 $@
     
    20812080    echo
    20822081
    2083     $as_echo "## ---------------- ##
     2082    cat <<\_ASBOX
     2083## ---------------- ##
    20842084## Cache variables. ##
    2085 ## ---------------- ##"
     2085## ---------------- ##
     2086_ASBOX
    20862087    echo
    20872088    # The following way of writing the cache mishandles newlines in values,
     
    21172118    echo
    21182119
    2119     $as_echo "## ----------------- ##
     2120    cat <<\_ASBOX
     2121## ----------------- ##
    21202122## Output variables. ##
    2121 ## ----------------- ##"
     2123## ----------------- ##
     2124_ASBOX
    21222125    echo
    21232126    for ac_var in $ac_subst_vars
     
    21322135
    21332136    if test -n "$ac_subst_files"; then
    2134       $as_echo "## ------------------- ##
     2137      cat <<\_ASBOX
     2138## ------------------- ##
    21352139## File substitutions. ##
    2136 ## ------------------- ##"
     2140## ------------------- ##
     2141_ASBOX
    21372142      echo
    21382143      for ac_var in $ac_subst_files
     
    21482153
    21492154    if test -s confdefs.h; then
    2150       $as_echo "## ----------- ##
     2155      cat <<\_ASBOX
     2156## ----------- ##
    21512157## confdefs.h. ##
    2152 ## ----------- ##"
     2158## ----------- ##
     2159_ASBOX
    21532160      echo
    21542161      cat confdefs.h
     
    22052212ac_site_file2=NONE
    22062213if test -n "$CONFIG_SITE"; then
    2207   # We do not want a PATH search for config.site.
    2208   case $CONFIG_SITE in #((
    2209     -*)  ac_site_file1=./$CONFIG_SITE;;
    2210     */*) ac_site_file1=$CONFIG_SITE;;
    2211     *)   ac_site_file1=./$CONFIG_SITE;;
    2212   esac
     2214  ac_site_file1=$CONFIG_SITE
    22132215elif test "x$prefix" != xNONE; then
    22142216  ac_site_file1=$prefix/share/config.site
     
    22252227$as_echo "$as_me: loading site script $ac_site_file" >&6;}
    22262228    sed 's/^/| /' "$ac_site_file" >&5
    2227     . "$ac_site_file" \
    2228       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    2229 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    2230 as_fn_error $? "failed to load site script $ac_site_file
    2231 See \`config.log' for more details" "$LINENO" 5 ; }
     2229    . "$ac_site_file"
    22322230  fi
    22332231done
     
    23052303  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
    23062304$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
    2307   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
     2305  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
    23082306fi
    23092307## -------------------- ##
     
    23232321ac_aux_dir=
    23242322for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
    2325   if test -f "$ac_dir/install-sh"; then
    2326     ac_aux_dir=$ac_dir
    2327     ac_install_sh="$ac_aux_dir/install-sh -c"
    2328     break
    2329   elif test -f "$ac_dir/install.sh"; then
    2330     ac_aux_dir=$ac_dir
    2331     ac_install_sh="$ac_aux_dir/install.sh -c"
    2332     break
    2333   elif test -f "$ac_dir/shtool"; then
    2334     ac_aux_dir=$ac_dir
    2335     ac_install_sh="$ac_aux_dir/shtool install -c"
    2336     break
    2337   fi
     2323  for ac_t in install-sh install.sh shtool; do
     2324    if test -f "$ac_dir/$ac_t"; then
     2325      ac_aux_dir=$ac_dir
     2326      ac_install_sh="$ac_aux_dir/$ac_t -c"
     2327      break 2
     2328    fi
     2329  done
    23382330done
    23392331if test -z "$ac_aux_dir"; then
    2340   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
     2332  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
    23412333fi
    23422334
     
    24542446case `pwd` in
    24552447  *[\\\"\#\$\&\'\`$am_lf]*)
    2456     as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
     2448    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
    24572449esac
    24582450case $srcdir in
    24592451  *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
    2460     as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
     2452    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
    24612453esac
    24622454
     
    24802472      # broken ls alias from the environment.  This has actually
    24812473      # happened.  Such a system could not be considered "sane".
    2482       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
     2474      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
    24832475alias in your environment" "$LINENO" 5
    24842476   fi
     
    24902482   :
    24912483else
    2492    as_fn_error $? "newly created file is older than distributed files!
     2484   as_fn_error "newly created file is older than distributed files!
    24932485Check your system clock" "$LINENO" 5
    24942486fi
     
    27282720set x ${MAKE-make}
    27292721ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
    2730 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
     2722if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
    27312723  $as_echo_n "(cached) " >&6
    27322724else
     
    27362728    @echo '@@@%%%=$(MAKE)=@@@%%%'
    27372729_ACEOF
    2738 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
     2730# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    27392731case `${MAKE-make} -f conftest.make 2>/dev/null` in
    27402732  *@@@%%%=?*=@@@%%%*)
     
    27702762  # test to see if srcdir already configured
    27712763  if test -f $srcdir/config.status; then
    2772     as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
     2764    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
    27732765  fi
    27742766fi
     
    27862778# Define the identity of the package.
    27872779 PACKAGE='libenet'
    2788  VERSION='1.3.1'
     2780 VERSION='1.3.3'
    27892781
    27902782
     
    31293121test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    31303122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3131 as_fn_error $? "no acceptable C compiler found in \$PATH
    3132 See \`config.log' for more details" "$LINENO" 5 ; }
     3123as_fn_error "no acceptable C compiler found in \$PATH
     3124See \`config.log' for more details." "$LINENO" 5; }
    31333125
    31343126# Provide some information about the compiler.
     
    32443236{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    32453237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3246 as_fn_error 77 "C compiler cannot create executables
    3247 See \`config.log' for more details" "$LINENO" 5 ; }
     3238{ as_fn_set_status 77
     3239as_fn_error "C compiler cannot create executables
     3240See \`config.log' for more details." "$LINENO" 5; }; }
    32483241else
    32493242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
     
    32873280  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    32883281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3289 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
    3290 See \`config.log' for more details" "$LINENO" 5 ; }
     3282as_fn_error "cannot compute suffix of executables: cannot compile and link
     3283See \`config.log' for more details." "$LINENO" 5; }
    32913284fi
    32923285rm -f conftest conftest$ac_cv_exeext
     
    33453338    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    33463339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3347 as_fn_error $? "cannot run C compiled programs.
     3340as_fn_error "cannot run C compiled programs.
    33483341If you meant to cross compile, use \`--host'.
    3349 See \`config.log' for more details" "$LINENO" 5 ; }
     3342See \`config.log' for more details." "$LINENO" 5; }
    33503343    fi
    33513344  fi
     
    33983391{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    33993392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    3400 as_fn_error $? "cannot compute suffix of object files: cannot compile
    3401 See \`config.log' for more details" "$LINENO" 5 ; }
     3393as_fn_error "cannot compute suffix of object files: cannot compile
     3394See \`config.log' for more details." "$LINENO" 5; }
    34023395fi
    34033396rm -f conftest.$ac_cv_objext conftest.$ac_ext
     
    38353828# Make sure we can run config.sub.
    38363829$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
    3837   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
     3830  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
    38383831
    38393832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
     
    38463839  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
    38473840test "x$ac_build_alias" = x &&
    3848   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
     3841  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
    38493842ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
    3850   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
     3843  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
    38513844
    38523845fi
     
    38553848case $ac_cv_build in
    38563849*-*-*) ;;
    3857 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
     3850*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
    38583851esac
    38593852build=$ac_cv_build
     
    38803873else
    38813874  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
    3882     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
     3875    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
    38833876fi
    38843877
     
    38883881case $ac_cv_host in
    38893882*-*-*) ;;
    3890 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
     3883*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
    38913884esac
    38923885host=$ac_cv_host
     
    39613954IFS=$as_save_IFS
    39623955  if test -z "$ac_cv_path_SED"; then
    3963     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
     3956    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
    39643957  fi
    39653958else
     
    40374030IFS=$as_save_IFS
    40384031  if test -z "$ac_cv_path_GREP"; then
    4039     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
     4032    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
    40404033  fi
    40414034else
     
    41034096IFS=$as_save_IFS
    41044097  if test -z "$ac_cv_path_EGREP"; then
    4105     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
     4098    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
    41064099  fi
    41074100else
     
    41704163IFS=$as_save_IFS
    41714164  if test -z "$ac_cv_path_FGREP"; then
    4172     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
     4165    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
    41734166  fi
    41744167else
     
    42864279$as_echo "no" >&6; }
    42874280fi
    4288 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
     4281test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
    42894282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
    42904283$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
     
    44884481  lt_cv_nm_interface="BSD nm"
    44894482  echo "int some_variable = 0;" > conftest.$ac_ext
    4490   (eval echo "\"\$as_me:4490: $ac_compile\"" >&5)
     4483  (eval echo "\"\$as_me:4483: $ac_compile\"" >&5)
    44914484  (eval "$ac_compile" 2>conftest.err)
    44924485  cat conftest.err >&5
    4493   (eval echo "\"\$as_me:4493: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
     4486  (eval echo "\"\$as_me:4486: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    44944487  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    44954488  cat conftest.err >&5
    4496   (eval echo "\"\$as_me:4496: output\"" >&5)
     4489  (eval echo "\"\$as_me:4489: output\"" >&5)
    44974490  cat conftest.out >&5
    44984491  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     
    57005693*-*-irix6*)
    57015694  # Find out which ABI we are using.
    5702   echo '#line 5702 "configure"' > conftest.$ac_ext
     5695  echo '#line 5695 "configure"' > conftest.$ac_ext
    57035696  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    57045697  (eval $ac_compile) 2>&5
     
    64896482continue
    64906483fi
    6491 rm -f conftest.err conftest.i conftest.$ac_ext
     6484rm -f conftest.err conftest.$ac_ext
    64926485
    64936486  # OK, works on sane cases.  Now check whether nonexistent headers
     
    65056498break
    65066499fi
    6507 rm -f conftest.err conftest.i conftest.$ac_ext
     6500rm -f conftest.err conftest.$ac_ext
    65086501
    65096502done
    65106503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
    6511 rm -f conftest.i conftest.err conftest.$ac_ext
     6504rm -f conftest.err conftest.$ac_ext
    65126505if $ac_preproc_ok; then :
    65136506  break
     
    65486541continue
    65496542fi
    6550 rm -f conftest.err conftest.i conftest.$ac_ext
     6543rm -f conftest.err conftest.$ac_ext
    65516544
    65526545  # OK, works on sane cases.  Now check whether nonexistent headers
     
    65646557break
    65656558fi
    6566 rm -f conftest.err conftest.i conftest.$ac_ext
     6559rm -f conftest.err conftest.$ac_ext
    65676560
    65686561done
    65696562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
    6570 rm -f conftest.i conftest.err conftest.$ac_ext
     6563rm -f conftest.err conftest.$ac_ext
    65716564if $ac_preproc_ok; then :
    65726565
     
    65746567  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
    65756568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
    6576 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
    6577 See \`config.log' for more details" "$LINENO" 5 ; }
     6569as_fn_error "C preprocessor \"$CPP\" fails sanity check
     6570See \`config.log' for more details." "$LINENO" 5; }
    65786571fi
    65796572
     
    67046697ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
    67056698"
    6706 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
     6699eval as_val=\$$as_ac_Header
     6700   if test "x$as_val" = x""yes; then :
    67076701  cat >>confdefs.h <<_ACEOF
    67086702#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
     
    72297223   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    72307224   -e 's:$: $lt_compiler_flag:'`
    7231    (eval echo "\"\$as_me:7231: $lt_compile\"" >&5)
     7225   (eval echo "\"\$as_me:7225: $lt_compile\"" >&5)
    72327226   (eval "$lt_compile" 2>conftest.err)
    72337227   ac_status=$?
    72347228   cat conftest.err >&5
    7235    echo "$as_me:7235: \$? = $ac_status" >&5
     7229   echo "$as_me:7229: \$? = $ac_status" >&5
    72367230   if (exit $ac_status) && test -s "$ac_outfile"; then
    72377231     # The compiler can only warn and ignore the option if not recognized
     
    75687562   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    75697563   -e 's:$: $lt_compiler_flag:'`
    7570    (eval echo "\"\$as_me:7570: $lt_compile\"" >&5)
     7564   (eval echo "\"\$as_me:7564: $lt_compile\"" >&5)
    75717565   (eval "$lt_compile" 2>conftest.err)
    75727566   ac_status=$?
    75737567   cat conftest.err >&5
    7574    echo "$as_me:7574: \$? = $ac_status" >&5
     7568   echo "$as_me:7568: \$? = $ac_status" >&5
    75757569   if (exit $ac_status) && test -s "$ac_outfile"; then
    75767570     # The compiler can only warn and ignore the option if not recognized
     
    76737667   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    76747668   -e 's:$: $lt_compiler_flag:'`
    7675    (eval echo "\"\$as_me:7675: $lt_compile\"" >&5)
     7669   (eval echo "\"\$as_me:7669: $lt_compile\"" >&5)
    76767670   (eval "$lt_compile" 2>out/conftest.err)
    76777671   ac_status=$?
    76787672   cat out/conftest.err >&5
    7679    echo "$as_me:7679: \$? = $ac_status" >&5
     7673   echo "$as_me:7673: \$? = $ac_status" >&5
    76807674   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    76817675   then
     
    77287722   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    77297723   -e 's:$: $lt_compiler_flag:'`
    7730    (eval echo "\"\$as_me:7730: $lt_compile\"" >&5)
     7724   (eval echo "\"\$as_me:7724: $lt_compile\"" >&5)
    77317725   (eval "$lt_compile" 2>out/conftest.err)
    77327726   ac_status=$?
    77337727   cat out/conftest.err >&5
    7734    echo "$as_me:7734: \$? = $ac_status" >&5
     7728   echo "$as_me:7728: \$? = $ac_status" >&5
    77357729   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    77367730   then
     
    1011210106  lt_status=$lt_dlunknown
    1011310107  cat > conftest.$ac_ext <<_LT_EOF
    10114 #line 10114 "configure"
     10108#line 10108 "configure"
    1011510109#include "confdefs.h"
    1011610110
     
    1020810202  lt_status=$lt_dlunknown
    1020910203  cat > conftest.$ac_ext <<_LT_EOF
    10210 #line 10210 "configure"
     10204#line 10204 "configure"
    1021110205#include "confdefs.h"
    1021210206
     
    1063710631ac_libobjs=
    1063810632ac_ltlibobjs=
    10639 U=
    1064010633for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
    1064110634  # 1. Remove the extension, and $U if already installed.
     
    1066110654
    1066210655if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
    10663   as_fn_error $? "conditional \"AMDEP\" was never defined.
     10656  as_fn_error "conditional \"AMDEP\" was never defined.
    1066410657Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1066510658fi
    1066610659if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
    10667   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
     10660  as_fn_error "conditional \"am__fastdepCC\" was never defined.
    1066810661Usually this means the macro was only invoked conditionally." "$LINENO" 5
    1066910662fi
     
    1081510808
    1081610809
    10817 # as_fn_error STATUS ERROR [LINENO LOG_FD]
    10818 # ----------------------------------------
     10810# as_fn_error ERROR [LINENO LOG_FD]
     10811# ---------------------------------
    1081910812# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
    1082010813# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
    10821 # script with STATUS, using 1 if that was 0.
     10814# script with status $?, using 1 if that was 0.
    1082210815as_fn_error ()
    1082310816{
    10824   as_status=$1; test $as_status -eq 0 && as_status=1
    10825   if test "$4"; then
    10826     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    10827     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
     10817  as_status=$?; test $as_status -eq 0 && as_status=1
     10818  if test "$3"; then
     10819    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     10820    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
    1082810821  fi
    10829   $as_echo "$as_me: error: $2" >&2
     10822  $as_echo "$as_me: error: $1" >&2
    1083010823  as_fn_exit $as_status
    1083110824} # as_fn_error
     
    1102311016    done
    1102411017    test -z "$as_dirs" || eval "mkdir $as_dirs"
    11025   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
     11018  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
    1102611019
    1102711020
     
    1107611069# values after options handling.
    1107711070ac_log="
    11078 This file was extended by libenet $as_me 1.3.1, which was
    11079 generated by GNU Autoconf 2.67.  Invocation command line was
     11071This file was extended by libenet $as_me 1.3.3, which was
     11072generated by GNU Autoconf 2.65.  Invocation command line was
    1108011073
    1108111074  CONFIG_FILES    = $CONFIG_FILES
     
    1113311126ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    1113411127ac_cs_version="\\
    11135 libenet config.status 1.3.1
    11136 configured by $0, generated by GNU Autoconf 2.67,
     11128libenet config.status 1.3.3
     11129configured by $0, generated by GNU Autoconf 2.65,
    1113711130  with options \\"\$ac_cs_config\\"
    1113811131
    11139 Copyright (C) 2010 Free Software Foundation, Inc.
     11132Copyright (C) 2009 Free Software Foundation, Inc.
    1114011133This config.status script is free software; the Free Software Foundation
    1114111134gives unlimited permission to copy, distribute and modify it."
     
    1115511148do
    1115611149  case $1 in
    11157   --*=?*)
     11150  --*=*)
    1115811151    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    1115911152    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    11160     ac_shift=:
    11161     ;;
    11162   --*=)
    11163     ac_option=`expr "X$1" : 'X\([^=]*\)='`
    11164     ac_optarg=
    1116511153    ac_shift=:
    1116611154    ;;
     
    1118611174    case $ac_optarg in
    1118711175    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    11188     '') as_fn_error $? "missing file argument" ;;
    1118911176    esac
    1119011177    as_fn_append CONFIG_FILES " '$ac_optarg'"
     
    1119711184
    1119811185  # This is an error.
    11199   -*) as_fn_error $? "unrecognized option: \`$1'
     11186  -*) as_fn_error "unrecognized option: \`$1'
    1120011187Try \`$0 --help' for more information." ;;
    1120111188
     
    1151111498    "libenet.pc") CONFIG_FILES="$CONFIG_FILES libenet.pc" ;;
    1151211499
    11513   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
     11500  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
    1151411501  esac
    1151511502done
     
    1154811535  tmp=./conf$$-$RANDOM
    1154911536  (umask 077 && mkdir "$tmp")
    11550 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
     11537} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
    1155111538
    1155211539# Set up the scripts for CONFIG_FILES section.
     
    1156511552ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
    1156611553if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
    11567   ac_cs_awk_cr='\\r'
     11554  ac_cs_awk_cr='\r'
    1156811555else
    1156911556  ac_cs_awk_cr=$ac_cr
     
    1157911566  echo "_ACEOF"
    1158011567} >conf$$subs.sh ||
    11581   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
    11582 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
     11568  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
     11569ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
    1158311570ac_delim='%!_!# '
    1158411571for ac_last_try in false false false false false :; do
    1158511572  . ./conf$$subs.sh ||
    11586     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
     11573    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
    1158711574
    1158811575  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
     
    1159011577    break
    1159111578  elif $ac_last_try; then
    11592     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
     11579    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
    1159311580  else
    1159411581    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
     
    1167911666  cat
    1168011667fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
    11681   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
     11668  || as_fn_error "could not setup config files machinery" "$LINENO" 5
    1168211669_ACEOF
    1168311670
    11684 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
    11685 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
     11671# VPATH may cause trouble with some makes, so we remove $(srcdir),
     11672# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
    1168611673# trailing colons and then remove the whole line if VPATH becomes empty
    1168711674# (actually we leave an empty line to preserve line numbers).
    1168811675if test "x$srcdir" = x.; then
    11689   ac_vpsub='/^[  ]*VPATH[    ]*=[    ]*/{
    11690 h
    11691 s///
    11692 s/^/:/
    11693 s/[  ]*$/:/
    11694 s/:\$(srcdir):/:/g
    11695 s/:\${srcdir}:/:/g
    11696 s/:@srcdir@:/:/g
    11697 s/^:*//
     11676  ac_vpsub='/^[  ]*VPATH[    ]*=/{
     11677s/:*\$(srcdir):*/:/
     11678s/:*\${srcdir}:*/:/
     11679s/:*@srcdir@:*/:/
     11680s/^\([^=]*=[     ]*\):*/\1/
    1169811681s/:*$//
    11699 x
    11700 s/\(=[   ]*\).*/\1/
    11701 G
    11702 s/\n//
    1170311682s/^[^=]*=[   ]*$//
    1170411683}'
     
    1171811697  case $ac_mode$ac_tag in
    1171911698  :[FHL]*:*);;
    11720   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
     11699  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
    1172111700  :[FH]-) ac_tag=-:-;;
    1172211701  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
     
    1174611725       *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
    1174711726       esac ||
    11748        as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
     11727       as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
    1174911728      esac
    1175011729      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
     
    1177311752    case $ac_tag in
    1177411753    *:-:* | *:-) cat >"$tmp/stdin" \
    11775       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     11754      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
    1177611755    esac
    1177711756    ;;
     
    1191011889"
    1191111890eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
    11912   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     11891  || as_fn_error "could not create $ac_file" "$LINENO" 5
    1191311892
    1191411893test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
     
    1191611895  { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
    1191711896  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    11918 which seems to be undefined.  Please make sure it is defined" >&5
     11897which seems to be undefined.  Please make sure it is defined." >&5
    1191911898$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
    11920 which seems to be undefined.  Please make sure it is defined" >&2;}
     11899which seems to be undefined.  Please make sure it is defined." >&2;}
    1192111900
    1192211901  rm -f "$tmp/stdin"
     
    1192511904  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
    1192611905  esac \
    11927   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     11906  || as_fn_error "could not create $ac_file" "$LINENO" 5
    1192811907 ;;
    1192911908
     
    1267612655
    1267712656test $ac_write_fail = 0 ||
    12678   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
     12657  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
    1267912658
    1268012659
     
    1269712676  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
    1269812677  # would make configure fail if this is the last instruction.
    12699   $ac_cs_success || as_fn_exit 1
     12678  $ac_cs_success || as_fn_exit $?
    1270012679fi
    1270112680if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  • ps/trunk/libraries/enet/src/configure.ac

    r9573 r9822  
    1 AC_INIT([libenet], [1.3.1])
     1AC_INIT([libenet], [1.3.3])
    22AC_CONFIG_SRCDIR([include/enet/enet.h])
    33AM_INIT_AUTOMAKE([foreign])
  • ps/trunk/libraries/enet/src/host.c

    r9573 r9822  
    211211        channel -> outgoingUnreliableSequenceNumber = 0;
    212212        channel -> incomingReliableSequenceNumber = 0;
     213        channel -> incomingUnreliableSequenceNumber = 0;
    213214
    214215        enet_list_clear (& channel -> incomingReliableCommands);
  • ps/trunk/libraries/enet/src/include/enet/enet.h

    r9573 r9822  
    2626#define ENET_VERSION_MAJOR 1
    2727#define ENET_VERSION_MINOR 3
    28 #define ENET_VERSION_PATCH 1
     28#define ENET_VERSION_PATCH 3
    2929#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
    3030#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
     
    9797   ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1),
    9898   /** packet will not allocate data, and user must supply it instead */
    99    ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2)
     99   ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2),
     100   /** packet will be fragmented using unreliable (instead of reliable) sends
     101     * if it exceeds the MTU */
     102   ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3)
    100103} ENetPacketFlag;
    101104
     
    219222   enet_uint16  reliableWindows [ENET_PEER_RELIABLE_WINDOWS];
    220223   enet_uint16  incomingReliableSequenceNumber;
     224   enet_uint16  incomingUnreliableSequenceNumber;
    221225   ENetList     incomingReliableCommands;
    222226   ENetList     incomingUnreliableCommands;
  • ps/trunk/libraries/enet/src/include/enet/protocol.h

    r9573 r9822  
    3434   ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT    = 10,
    3535   ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11,
    36    ENET_PROTOCOL_COMMAND_COUNT              = 12,
     36   ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12,
     37   ENET_PROTOCOL_COMMAND_COUNT              = 13,
    3738
    3839   ENET_PROTOCOL_COMMAND_MASK               = 0x0F
  • ps/trunk/libraries/enet/src/peer.c

    r9573 r9822  
    114114   if (packet -> dataLength > fragmentLength)
    115115   {
    116       enet_uint16 startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingReliableSequenceNumber + 1);
    117116      enet_uint32 fragmentCount = ENET_HOST_TO_NET_32 ((packet -> dataLength + fragmentLength - 1) / fragmentLength),
    118117             fragmentNumber,
    119118             fragmentOffset;
     119      enet_uint8 commandNumber;
     120      enet_uint16 startSequenceNumber;
    120121      ENetList fragments;
    121122      ENetOutgoingCommand * fragment;
    122123
     124      if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT)) == ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT &&
     125          channel -> outgoingUnreliableSequenceNumber < 0xFFFF)
     126      {
     127         commandNumber = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT;
     128         startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingUnreliableSequenceNumber + 1);
     129      }
     130      else
     131      {
     132         commandNumber = ENET_PROTOCOL_COMMAND_SEND_FRAGMENT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE;
     133         startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingReliableSequenceNumber + 1);
     134      }
     135       
    123136      enet_list_clear (& fragments);
    124137
     
    148161         fragment -> fragmentLength = fragmentLength;
    149162         fragment -> packet = packet;
    150          fragment -> command.header.command = ENET_PROTOCOL_COMMAND_SEND_FRAGMENT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE;
     163         fragment -> command.header.command = commandNumber;
    151164         fragment -> command.header.channelID = channelID;
    152165         fragment -> command.sendFragment.startSequenceNumber = startSequenceNumber;
     
    174187   command.header.channelID = channelID;
    175188
    176    if (packet -> flags & ENET_PACKET_FLAG_RELIABLE)
    177    {
    178       command.header.command = ENET_PROTOCOL_COMMAND_SEND_RELIABLE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE;
    179       command.sendReliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength);
    180    }
    181    else
    182    if (packet -> flags & ENET_PACKET_FLAG_UNSEQUENCED)
     189   if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNSEQUENCED)) == ENET_PACKET_FLAG_UNSEQUENCED)
    183190   {
    184191      command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED | ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED;
    185       command.sendUnsequenced.unsequencedGroup = ENET_HOST_TO_NET_16 (peer -> outgoingUnsequencedGroup + 1);
    186192      command.sendUnsequenced.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength);
    187193   }
    188194   else
    189    if (channel -> outgoingUnreliableSequenceNumber >= 0xFFFF)
     195   if (packet -> flags & ENET_PACKET_FLAG_RELIABLE || channel -> outgoingUnreliableSequenceNumber >= 0xFFFF)
    190196   {
    191197      command.header.command = ENET_PROTOCOL_COMMAND_SEND_RELIABLE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE;
     
    195201   {
    196202      command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE;
    197       command.sendUnreliable.unreliableSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingUnreliableSequenceNumber + 1);
    198203      command.sendUnreliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength);
    199204   }
     
    258263
    259264static void
    260 enet_peer_reset_incoming_commands (ENetList * queue)
    261 {
    262     ENetIncomingCommand * incomingCommand;
    263 
    264     while (! enet_list_empty (queue))
    265     {
    266        incomingCommand = (ENetIncomingCommand *) enet_list_remove (enet_list_begin (queue));
    267 
     265enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startCommand, ENetListIterator endCommand)
     266{
     267    ENetListIterator currentCommand;   
     268   
     269    for (currentCommand = startCommand; currentCommand != endCommand; )
     270    {
     271       ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand;
     272
     273       currentCommand = enet_list_next (currentCommand);
     274
     275       enet_list_remove (& incomingCommand -> incomingCommandList);
     276 
    268277       if (incomingCommand -> packet != NULL)
    269278       {
     
    281290}
    282291
     292static void
     293enet_peer_reset_incoming_commands (ENetList * queue)
     294{
     295    enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end(queue));
     296}
     297 
    283298void
    284299enet_peer_reset_queues (ENetPeer * peer)
     
    551566    else
    552567    {
    553        ++ channel -> outgoingUnreliableSequenceNumber;
     568       if (outgoingCommand -> fragmentOffset == 0)
     569         ++ channel -> outgoingUnreliableSequenceNumber;
    554570       
    555571       outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber;
     
    563579    outgoingCommand -> command.header.reliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> reliableSequenceNumber);
    564580
     581    switch (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK)
     582    {
     583    case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE:
     584        outgoingCommand -> command.sendUnreliable.unreliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> unreliableSequenceNumber);
     585        break;
     586
     587    case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED:
     588        outgoingCommand -> command.sendUnsequenced.unsequencedGroup = ENET_HOST_TO_NET_16 (peer -> outgoingUnsequencedGroup);
     589        break;
     590   
     591    default:
     592        break;
     593    }
     594
    565595    if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE)
    566596      enet_list_insert (enet_list_end (& peer -> outgoingReliableCommands), outgoingCommand);
     
    591621enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel * channel)
    592622{
    593     ENetListIterator currentCommand;
    594 
    595     for (currentCommand = enet_list_begin (& channel -> incomingUnreliableCommands);
     623    ENetListIterator droppedCommand, startCommand, currentCommand;
     624
     625    for (droppedCommand = startCommand = currentCommand = enet_list_begin (& channel -> incomingUnreliableCommands);
    596626         currentCommand != enet_list_end (& channel -> incomingUnreliableCommands);
    597627         currentCommand = enet_list_next (currentCommand))
     
    599629       ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand;
    600630
    601        if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE &&
    602            incomingCommand -> reliableSequenceNumber != channel -> incomingReliableSequenceNumber)
     631       if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED)
     632         continue;
     633       else
     634       if (incomingCommand -> reliableSequenceNumber != channel -> incomingReliableSequenceNumber)
    603635         break;
    604     }
    605 
    606     if (currentCommand == enet_list_begin (& channel -> incomingUnreliableCommands))
    607       return;
    608 
    609     enet_list_move (enet_list_end (& peer -> dispatchedCommands), enet_list_begin (& channel -> incomingUnreliableCommands), enet_list_previous (currentCommand));
    610 
    611     if (! peer -> needsDispatch)
    612     {
    613        enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
    614 
    615        peer -> needsDispatch = 1;
    616     }
     636       else
     637       if (incomingCommand -> fragmentsRemaining <= 0)
     638         channel -> incomingUnreliableSequenceNumber = incomingCommand -> unreliableSequenceNumber;
     639       else
     640       if (startCommand == currentCommand)
     641         startCommand = enet_list_next (currentCommand);
     642       else
     643       {
     644            enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
     645
     646            if (! peer -> needsDispatch)
     647            {
     648                enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
     649
     650                peer -> needsDispatch = 1;
     651            }
     652
     653            droppedCommand = startCommand = enet_list_next (currentCommand);
     654       }
     655    }
     656
     657    if (startCommand != currentCommand)
     658    {
     659        enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand));
     660
     661        if (! peer -> needsDispatch)
     662        {
     663            enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList);
     664
     665            peer -> needsDispatch = 1;
     666        }
     667
     668        droppedCommand = startCommand = enet_list_next (currentCommand);
     669    }
     670
     671    enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand);
    617672}
    618673
     
    641696      return;
    642697
     698    channel -> incomingUnreliableSequenceNumber = 0;
     699
    643700    enet_list_move (enet_list_end (& peer -> dispatchedCommands), enet_list_begin (& channel -> incomingReliableCommands), enet_list_previous (currentCommand));
    644701
     
    685742    case ENET_PROTOCOL_COMMAND_SEND_RELIABLE:
    686743       if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber)
    687            goto freePacket;
     744         goto freePacket;
    688745       
    689746       for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands));
     
    713770
    714771    case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE:
     772    case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT:
    715773       unreliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendUnreliable.unreliableSequenceNumber);
     774
     775       if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber &&
     776           unreliableSequenceNumber <= channel -> incomingUnreliableSequenceNumber)
     777         goto freePacket;
    716778
    717779       for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands));
     
    721783          incomingCommand = (ENetIncomingCommand *) currentCommand;
    722784
    723           if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE)
     785          if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED)
    724786            continue;
    725787
  • ps/trunk/libraries/enet/src/protocol.c

    r9573 r9822  
    2424    sizeof (ENetProtocolBandwidthLimit),
    2525    sizeof (ENetProtocolThrottleConfigure),
     26    sizeof (ENetProtocolSendFragment)
    2627};
    2728
     
    320321        channel -> outgoingUnreliableSequenceNumber = 0;
    321322        channel -> incomingReliableSequenceNumber = 0;
     323        channel -> incomingUnreliableSequenceNumber = 0;
    322324
    323325        enet_list_clear (& channel -> incomingReliableCommands);
     
    574576
    575577       hostCommand.header.reliableSequenceNumber = startSequenceNumber;
    576        hostCommand.sendFragment.startSequenceNumber = startSequenceNumber;
    577        hostCommand.sendFragment.dataLength = fragmentLength;
    578        hostCommand.sendFragment.fragmentNumber = fragmentNumber;
    579        hostCommand.sendFragment.fragmentCount = fragmentCount;
    580        hostCommand.sendFragment.fragmentOffset = fragmentOffset;
    581        hostCommand.sendFragment.totalLength = totalLength;
    582578
    583579       startCommand = enet_peer_queue_incoming_command (peer, & hostCommand, packet, fragmentCount);
     
    601597        if (startCommand -> fragmentsRemaining <= 0)
    602598          enet_peer_dispatch_incoming_reliable_commands (peer, channel);
     599    }
     600
     601    return 0;
     602}
     603
     604static int
     605enet_protocol_handle_send_unreliable_fragment (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData)
     606{
     607    enet_uint32 fragmentNumber,
     608           fragmentCount,
     609           fragmentOffset,
     610           fragmentLength,
     611           reliableSequenceNumber,
     612           startSequenceNumber,
     613           totalLength;
     614    enet_uint16 reliableWindow, currentWindow;
     615    ENetChannel * channel;
     616    ENetListIterator currentCommand;
     617    ENetIncomingCommand * startCommand = NULL;
     618
     619    if (command -> header.channelID >= peer -> channelCount ||
     620        (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER))
     621      return -1;
     622
     623    fragmentLength = ENET_NET_TO_HOST_16 (command -> sendFragment.dataLength);
     624    * currentData += fragmentLength;
     625    if (* currentData > & host -> receivedData [host -> receivedDataLength])
     626      return -1;
     627
     628    channel = & peer -> channels [command -> header.channelID];
     629    reliableSequenceNumber = command -> header.reliableSequenceNumber;
     630    startSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendFragment.startSequenceNumber);
     631
     632    reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE;
     633    currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE;
     634
     635    if (reliableSequenceNumber < channel -> incomingReliableSequenceNumber)
     636      reliableWindow += ENET_PEER_RELIABLE_WINDOWS;
     637
     638    if (reliableWindow < currentWindow || reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1)
     639      return 0;
     640
     641    if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber &&
     642        startSequenceNumber <= channel -> incomingUnreliableSequenceNumber)
     643      return 0;
     644
     645    fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber);
     646    fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount);
     647    fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset);
     648    totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength);
     649
     650    if (fragmentOffset >= totalLength ||
     651        fragmentOffset + fragmentLength > totalLength ||
     652        fragmentNumber >= fragmentCount)
     653      return -1;
     654
     655    for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands));
     656         currentCommand != enet_list_end (& channel -> incomingUnreliableCommands);
     657         currentCommand = enet_list_previous (currentCommand))
     658    {
     659       ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand;
     660
     661       if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber)
     662       {
     663          if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber)
     664            continue;
     665       }
     666       else
     667       if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber)
     668         break;
     669
     670       if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber)
     671         break;
     672
     673       if (incomingCommand -> reliableSequenceNumber > reliableSequenceNumber)
     674         continue;
     675
     676       if (incomingCommand -> unreliableSequenceNumber <= startSequenceNumber)
     677       {
     678          if (incomingCommand -> unreliableSequenceNumber < startSequenceNumber)
     679            break;
     680
     681          if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT ||
     682              totalLength != incomingCommand -> packet -> dataLength ||
     683              fragmentCount != incomingCommand -> fragmentCount)
     684            return -1;
     685
     686          startCommand = incomingCommand;
     687          break;
     688       }
     689    }
     690
     691    if (startCommand == NULL)
     692    {
     693       ENetPacket * packet = enet_packet_create (NULL, totalLength, ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT);
     694       if (packet == NULL)
     695         return -1;
     696
     697       startCommand = enet_peer_queue_incoming_command (peer, command, packet, fragmentCount);
     698       if (startCommand == NULL)
     699         return -1;
     700    }
     701
     702    if ((startCommand -> fragments [fragmentNumber / 32] & (1 << (fragmentNumber % 32))) == 0)
     703    {
     704       -- startCommand -> fragmentsRemaining;
     705
     706       startCommand -> fragments [fragmentNumber / 32] |= (1 << (fragmentNumber % 32));
     707
     708       if (fragmentOffset + fragmentLength > startCommand -> packet -> dataLength)
     709         fragmentLength = startCommand -> packet -> dataLength - fragmentOffset;
     710
     711       memcpy (startCommand -> packet -> data + fragmentOffset,
     712               (enet_uint8 *) command + sizeof (ENetProtocolSendFragment),
     713               fragmentLength);
     714
     715        if (startCommand -> fragmentsRemaining <= 0)
     716          enet_peer_dispatch_incoming_unreliable_commands (peer, channel);
    603717    }
    604718
     
    651765    enet_peer_reset_queues (peer);
    652766
    653     if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED)
     767    if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING)
    654768        enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE);
    655769    else
     
    853967       if (peer -> state == ENET_PEER_STATE_DISCONNECTED ||
    854968           peer -> state == ENET_PEER_STATE_ZOMBIE ||
    855            (host -> receivedAddress.host != peer -> address.host &&
     969           ((host -> receivedAddress.host != peer -> address.host ||
     970             host -> receivedAddress.port != peer -> address.port) &&
    856971             peer -> address.host != ENET_HOST_BROADCAST) ||
    857972           (peer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID &&
     
    9831098       case ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE:
    9841099          if (enet_protocol_handle_throttle_configure (host, peer, command))
     1100            goto commandError;
     1101          break;
     1102
     1103       case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT:
     1104          if (enet_protocol_handle_send_unreliable_fragment (host, peer, command, & currentData))
    9851105            goto commandError;
    9861106          break;
     
    11391259           peer -> mtu - host -> packetSize < commandSize ||
    11401260           (outgoingCommand -> packet != NULL &&
    1141              peer -> mtu - host -> packetSize < commandSize + outgoingCommand -> packet -> dataLength))
     1261             peer -> mtu - host -> packetSize < commandSize + outgoingCommand -> fragmentLength))
    11421262       {
    11431263          host -> continueSending = 1;
     
    11481268       currentCommand = enet_list_next (currentCommand);
    11491269
    1150        if (outgoingCommand -> packet != NULL)
     1270       if (outgoingCommand -> packet != NULL && outgoingCommand -> fragmentOffset == 0)
    11511271       {
    11521272          peer -> packetThrottleCounter += ENET_PEER_PACKET_THROTTLE_COUNTER;
     
    11551275          if (peer -> packetThrottleCounter > peer -> packetThrottle)
    11561276          {
    1157              -- outgoingCommand -> packet -> referenceCount;
    1158 
    1159              if (outgoingCommand -> packet -> referenceCount == 0)
    1160                enet_packet_destroy (outgoingCommand -> packet);
     1277             enet_uint16 reliableSequenceNumber = outgoingCommand -> reliableSequenceNumber,
     1278                         unreliableSequenceNumber = outgoingCommand -> unreliableSequenceNumber;
     1279             for (;;)
     1280             {
     1281                -- outgoingCommand -> packet -> referenceCount;
     1282
     1283                if (outgoingCommand -> packet -> referenceCount == 0)
     1284                  enet_packet_destroy (outgoingCommand -> packet);
    11611285         
    1162              enet_list_remove (& outgoingCommand -> outgoingCommandList);
    1163              enet_free (outgoingCommand);
     1286                enet_list_remove (& outgoingCommand -> outgoingCommandList);
     1287                enet_free (outgoingCommand);
     1288
     1289                if (currentCommand == enet_list_end (& peer -> outgoingUnreliableCommands))
     1290                  break;
     1291
     1292                outgoingCommand = (ENetOutgoingCommand *) currentCommand;
     1293                if (outgoingCommand -> reliableSequenceNumber != reliableSequenceNumber ||
     1294                    outgoingCommand -> unreliableSequenceNumber != unreliableSequenceNumber)
     1295                  break;
     1296
     1297                currentCommand = enet_list_next (currentCommand);
     1298             }
    11641299           
    11651300             continue;
     
    11801315          ++ buffer;
    11811316         
    1182           buffer -> data = outgoingCommand -> packet -> data;
    1183           buffer -> dataLength = outgoingCommand -> packet -> dataLength;
     1317          buffer -> data = outgoingCommand -> packet -> data + outgoingCommand -> fragmentOffset;
     1318          buffer -> dataLength = outgoingCommand -> fragmentLength;
    11841319
    11851320          host -> packetSize += buffer -> dataLength;
Note: See TracChangeset for help on using the changeset viewer.