# HG changeset patch # User Robert McIntyre # Date 1330901780 21600 # Node ID e0545ef33bb9ab8f73f3ca58f7915bc813242827 # Parent ecd30c5e2f5a855e9755557fa0f276835d401967 trying to fix network problem diff -r ecd30c5e2f5a -r e0545ef33bb9 configure.ac --- a/configure.ac Sun Mar 04 14:35:54 2012 -0600 +++ b/configure.ac Sun Mar 04 16:56:20 2012 -0600 @@ -10,42 +10,50 @@ AC_CONFIG_SRCDIR([src/lua/lopcodes.c]) AC_CONFIG_HEADERS([config.h]) - # Checks for programs. AC_PROG_CXX AC_PROG_CC +AC_PROG_AWK +AC_PROG_INSTALL AC_PROG_RANLIB +AC_PROG_CPP +AC_PROG_MKDIR_P - -# SDL stuff -SDL_VERSION=1.2.2 -AM_PATH_SDL($SDL_VERSION,[ -],[ -AC_MSG_ERROR([*** Couldn't find SDL library (version >= $SDL_VERSION).]) -]) +# Checks for libraries. +AC_CHECK_LIB([SDL], [SDL_Init]) +AC_CHECK_LIB([pthread], [pthread_create]) # Checks for header files. -AC_CHECK_HEADERS([limits.h locale.h stddef.h stdlib.h string.h unistd.h]) +AC_CHECK_HEADERS([arpa/inet.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/socket.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T AC_CHECK_TYPES([ptrdiff_t]) # Checks for library functions. AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_MALLOC AC_FUNC_MKTIME -AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STRCOLL -AC_CHECK_FUNCS([floor localeconv memchr memset dnl - modf pow setlocale sqrt dnl - strchr strcspn strerror dnl - strpbrk strrchr strstr strtoul]) +AC_CHECK_FUNCS([floor ftruncate gethostbyname gethostname inet_ntoa localeconv memchr memset modf pow setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strpbrk strrchr strstr strtoul]) + + + AC_CONFIG_FILES([Makefile src/Makefile diff -r ecd30c5e2f5a -r e0545ef33bb9 src/common/Makefile.am --- a/src/common/Makefile.am Sun Mar 04 14:35:54 2012 -0600 +++ b/src/common/Makefile.am Sun Mar 04 16:56:20 2012 -0600 @@ -28,4 +28,4 @@ -DSDL \ -DSYSCONFDIR=\"$(sysconfdir)\" -AM_CXXFLAGS = -fno-exceptions @SDL_CFLAGS@ +AM_CXXFLAGS = -fno-exceptions diff -r ecd30c5e2f5a -r e0545ef33bb9 src/gba/Makefile.am --- a/src/gba/Makefile.am Sun Mar 04 14:35:54 2012 -0600 +++ b/src/gba/Makefile.am Sun Mar 04 16:56:20 2012 -0600 @@ -45,4 +45,4 @@ -DSDL \ -DSYSCONFDIR=\"$(sysconfdir)\" -AM_CXXFLAGS = -fno-exceptions @SDL_CFLAGS@ +AM_CXXFLAGS = -fno-exceptions diff -r ecd30c5e2f5a -r e0545ef33bb9 src/gba/remote.cpp --- a/src/gba/remote.cpp Sun Mar 04 14:35:54 2012 -0600 +++ b/src/gba/remote.cpp Sun Mar 04 16:56:20 2012 -0600 @@ -121,12 +121,15 @@ fprintf(stderr, "Error listening\n"); exit(-1); } - socklen_t len = sizeof(addr); + #ifdef WIN32 int flag = 0; ioctlsocket(s, FIONBIO, (unsigned long *)&flag); #endif // WIN32 + + socklen_t len = sizeof(addr); + int s2 = accept(s, (sockaddr *)&addr, &len); if (s2 > 0) {