Skip to content

Commit

Permalink
Try to fix isatty linkage errors on Windows.
Browse files Browse the repository at this point in the history
Hope this works, somehow.
  • Loading branch information
Cyp committed Dec 20, 2010
1 parent c95692c commit d9ce212
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
11 changes: 2 additions & 9 deletions lib/framework/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
#include "trig.h"
#include "cursors.h"

#ifdef __cplusplus
extern "C"
{
#endif //__cplusplus

extern uint32_t selectedPlayer; ///< The player number corresponding to this client.
extern uint32_t realSelectedPlayer; ///< The player number corresponding to this client (same as selectedPlayer, unless changing players in the debug menu).
#define MAX_PLAYERS 8 /**< Maximum number of players in the game. */
Expand Down Expand Up @@ -113,15 +108,13 @@ extern UDWORD frameGetAverageRate(void);
extern UDWORD HashString( const char *String );
extern UDWORD HashStringIgnoreCase( const char *String );

#ifdef __cplusplus
}
#endif //__cplusplus

#if defined(WZ_OS_WIN)
# include <winsock2.h> /* for struct timeval */

struct timezone;
extern int gettimeofday(struct timeval* tv, struct timezone* tz);

extern "C" int isatty(int); // Apparently flex declares isatty with C++ linkage on Windows. Don't ask why. Declaring here instead.
#endif

static inline WZ_DECL_CONST const char * bool2string(bool var)
Expand Down
10 changes: 0 additions & 10 deletions src/multiplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@
#include "featuredef.h"
#include "droid.h" // For INITIAL_DROID_ORDERS.

#ifdef __cplusplus
extern "C"
{
#endif //__cplusplus

// /////////////////////////////////////////////////////////////////////////////////////////////////
// Game Options Structure. Enough info to completely describe the static stuff in amultiplay game.
typedef struct {
Expand Down Expand Up @@ -91,7 +86,6 @@ extern MULTIPLAYERINGAME ingame; // the game description.

extern BOOL bMultiPlayer; // true when more than 1 player.
extern BOOL bMultiMessages; // == bMultiPlayer unless multi messages are disabled
extern UDWORD selectedPlayer;
extern BOOL openchannels[MAX_PLAYERS];
extern UBYTE bDisplayMultiJoiningStatus; // draw load progress?

Expand Down Expand Up @@ -236,8 +230,4 @@ extern void resetReadyStatus (bool bSendOptions);

extern BOOL bPlayerReadyGUI[MAX_PLAYERS];

#ifdef __cplusplus
}
#endif //__cplusplus

#endif // __INCLUDED_SRC_MULTIPLAY_H__

0 comments on commit d9ce212

Please sign in to comment.