[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp
From: |
Jon Daniel |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src network_worker.cpp |
Date: |
Sat, 17 Sep 2005 16:52:23 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Jon Daniel <address@hidden> 05/09/17 20:52:23
Modified files:
src : network_worker.cpp
Log message:
don't use EAGAIN in case it is defined for socket calls in BeOS
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/network_worker.cpp.diff?tr1=1.55&tr2=1.56&r1=text&r2=text
Patches:
Index: wesnoth/src/network_worker.cpp
diff -u wesnoth/src/network_worker.cpp:1.55 wesnoth/src/network_worker.cpp:1.56
--- wesnoth/src/network_worker.cpp:1.55 Thu Sep 15 23:33:41 2005
+++ wesnoth/src/network_worker.cpp Sat Sep 17 20:52:23 2005
@@ -1,4 +1,4 @@
-/* $Id: network_worker.cpp,v 1.55 2005/09/15 23:33:41 j_daniel Exp $ */
+/* $Id: network_worker.cpp,v 1.56 2005/09/17 20:52:23 j_daniel Exp $ */
/*
Copyright (C) 2003-5 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -29,35 +29,34 @@
#include <vector>
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
-#include <windows.h>
-#define USE_SELECT 1
+# include <windows.h>
+# define USE_SELECT 1
#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef __BEOS__
-#include <socket.h>
-#else
-#include <fcntl.h>
-#endif
-#define SOCKET int
-#ifdef HAVE_POLL_H
-#define USE_POLL 1
-#include <poll.h>
-#elif defined(HAVE_SYS_POLL_H)
-#define USE_POLL 1
-#include <sys/poll.h>
-#endif
-
-#ifndef USE_POLL
-#define USE_SELECT 1
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#else
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-#endif
-#endif
+# include <sys/types.h>
+# include <sys/socket.h>
+# ifdef __BEOS__
+# include <socket.h>
+# else
+# include <fcntl.h>
+# endif
+# define SOCKET int
+# ifdef HAVE_POLL_H
+# define USE_POLL 1
+# include <poll.h>
+# elif defined(HAVE_SYS_POLL_H)
+# define USE_POLL 1
+# include <sys/poll.h>
+# endif
+# ifndef USE_POLL
+# define USE_SELECT 1
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# else
+# include <sys/time.h>
+# include <sys/types.h>
+# include <unistd.h>
+# endif
+# endif
#endif
@@ -128,7 +127,7 @@
const int res = SDLNet_TCP_Send(sock, &buf[upto],
static_cast<int>(size - upto));
if(res <= 0) {
-#ifdef EAGAIN
+#if defined(EAGAIN) && !defined(__BEOS__)
if(errno == EAGAIN) {
#elif defined(EWOULDBLOCK)
if(errno == EWOULDBLOCK) {
@@ -221,7 +220,7 @@
const int res = SDLNet_TCP_Recv(sock, beg, end - beg);
if(res <= 0) {
-#ifdef EAGAIN
+#if defined(EAGAIN) && !defined(__BEOS__)
if(errno == EAGAIN) {
#elif defined(EWOULDBLOCK)
if(errno == EWOULDBLOCK) {
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, David White, 2005/09/03
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, David White, 2005/09/05
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/05
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/05
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/05
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/06
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/06
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/13
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp, Jon Daniel, 2005/09/13
- [Wesnoth-cvs-commits] wesnoth/src network_worker.cpp,
Jon Daniel <=