enet updates

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4850 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2010-05-14 02:10:55 +00:00
parent 50cb16a1c2
commit 43b412d183
8 changed files with 53 additions and 8001 deletions
+6 -4
View File
@@ -40,15 +40,17 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(enetinclude_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libenet.pc.in $(top_srcdir)/configure ChangeLog \
config.guess config.sub depcomp install-sh ltmain.sh missing \
mkinstalldirs
config.guess config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = libenet.pc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+5 -7966
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -5,14 +5,11 @@
#define ENET_BUILDING_LIB 1
#include "enet/enet.h"
static ENetCallbacks callbacks = { malloc, free, rand };
static ENetCallbacks callbacks = { malloc, free, rand, abort };
int
enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits)
{
if (version != ENET_VERSION)
return -1;
if (inits -> malloc != NULL || inits -> free != NULL)
{
if (inits -> malloc == NULL || inits -> free == NULL)
@@ -25,6 +22,12 @@ enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits
if (inits -> rand != NULL)
callbacks.rand = inits -> rand;
if (version >= ENET_VERSION_CREATE(1, 2, 2))
{
if (inits -> no_memory != NULL)
callbacks.no_memory = inits -> no_memory;
}
return enet_initialize ();
}
@@ -34,7 +37,7 @@ enet_malloc (size_t size)
void * memory = callbacks.malloc (size);
if (memory == NULL)
abort ();
callbacks.no_memory ();
return memory;
}
+24 -20
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.65 for libenet 5-13-2010.
# Generated by GNU Autoconf 2.65 for libenet 1.2.2.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -698,8 +698,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libenet'
PACKAGE_TARNAME='libenet'
PACKAGE_VERSION='5-13-2010'
PACKAGE_STRING='libenet 5-13-2010'
PACKAGE_VERSION='1.2.2'
PACKAGE_STRING='libenet 1.2.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1411,7 +1411,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 libenet 5-13-2010 to adapt to many kinds of systems.
\`configure' configures libenet 1.2.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1481,7 +1481,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libenet 5-13-2010:";;
short | recursive ) echo "Configuration of libenet 1.2.2:";;
esac
cat <<\_ACEOF
@@ -1581,7 +1581,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libenet configure 5-13-2010
libenet configure 1.2.2
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1970,7 +1970,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libenet $as_me 5-13-2010, which was
It was created by libenet $as_me 1.2.2, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2779,7 +2779,7 @@ fi
# Define the identity of the package.
PACKAGE='libenet'
VERSION='5-13-2010'
VERSION='1.2.2'
cat >>confdefs.h <<_ACEOF
@@ -7195,6 +7195,10 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
## the running order or otherwise move them around unless you know exactly
## what you are doing...
if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
@@ -7220,11 +7224,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7223: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7227: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7227: \$? = $ac_status" >&5
echo "$as_me:7231: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7559,11 +7563,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7562: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7566: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7566: \$? = $ac_status" >&5
echo "$as_me:7570: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7664,11 +7668,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7667: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7671: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7671: \$? = $ac_status" >&5
echo "$as_me:7675: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7719,11 +7723,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7722: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7726: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7726: \$? = $ac_status" >&5
echo "$as_me:7730: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10103,7 +10107,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10106 "configure"
#line 10110 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10199,7 +10203,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10202 "configure"
#line 10206 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11085,7 +11089,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libenet $as_me 5-13-2010, which was
This file was extended by libenet $as_me 1.2.2, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11142,7 +11146,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libenet config.status 5-13-2010
libenet config.status 1.2.2
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
+1 -1
View File
@@ -1,4 +1,4 @@
AC_INIT([libenet], [5-13-2010])
AC_INIT([libenet], [1.2.2])
AC_CONFIG_SRCDIR([include/enet/enet.h])
AM_INIT_AUTOMAKE([foreign])
+1
View File
@@ -12,6 +12,7 @@ typedef struct _ENetCallbacks
void * (ENET_CALLBACK * malloc) (size_t size);
void (ENET_CALLBACK * free) (void * memory);
int (ENET_CALLBACK * rand) (void);
void (ENET_CALLBACK * no_memory) (void);
} ENetCallbacks;
/** @defgroup callbacks ENet internal callbacks
+8 -5
View File
@@ -23,10 +23,13 @@ extern "C"
#include "enet/list.h"
#include "enet/callbacks.h"
typedef enum _ENetVersion
{
ENET_VERSION = 1
} ENetVersion;
#define ENET_VERSION_MAJOR 1
#define ENET_VERSION_MINOR 2
#define ENET_VERSION_PATCH 2
#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
typedef enet_uint32 ENetVersion;
typedef enum _ENetSocketType
{
@@ -376,7 +379,7 @@ typedef struct _ENetEvent
ENET_API int enet_initialize (void);
/**
Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant.
Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored.
@param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use
@param inits user-overriden callbacks where any NULL callbacks will use ENet's defaults