1
0
forked from 0ad/0ad

fixed conflict between posix.h, windows.h

This was SVN commit r42.
This commit is contained in:
janwas 2003-11-06 20:10:37 +00:00
parent 071dca65cc
commit 48e4105926
6 changed files with 27 additions and 18 deletions

View File

@ -16,6 +16,8 @@
// Jan.Wassenberg@stud.uni-karlsruhe.de
// http://www.stud.uni-karlsruhe.de/~urkt/
#include <stddef.h>
#ifndef _WIN32
#include <sys/types.h>
@ -41,6 +43,7 @@
#ifndef __POSIX_H__
#define __POSIX_H__
#include <sys/stat.h>
#include <sys/types.h>
@ -64,11 +67,6 @@ typedef unsigned short u16_t;
// <sys/types.h>
//
#ifndef _SIZE_T_DEFINED // compatibility with VC stdlib.h
#define _SIZE_T_DEFINED
typedef unsigned long size_t;
#endif
typedef long ssize_t;

View File

@ -21,6 +21,11 @@
#include "types.h"
// the following are internal to the resource manager,
// but are required for the HDATA definition
// (which is passed around to modules that create handles).
// we don't want to waste memory or fragment the handle data
// by splitting into internal/external
// handle type (for 'type safety' - can't use a texture handle as a sound)

View File

@ -19,10 +19,6 @@
#include <time.h>
#include <cmath>
#ifdef _WIN32
#include "win.h"
#endif
#include "ia32.h"
#include "posix.h"
#include "detect.h"
@ -30,6 +26,11 @@
#include "types.h"
#include "misc.h"
#ifdef _WIN32
#include "win.h"
#endif
// high resolution (> 1 µs) timestamp [s], starting at or near 0 s.
//

View File

@ -1,7 +1,9 @@
// sockets already defined by posix.h
#ifdef __POSIX_H__
#ifndef __WIN_H__
#define __WIN_H__
// Win32 socket decls aren't portable (e.g. problems with socklen_t)
// => skip winsock.h; posix.h should be used instead
#define _WINSOCKAPI_
#endif
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRALEAN
@ -76,3 +78,5 @@ extern int _close(int);
extern __declspec(dllimport) int __stdcall WSAStartup(WORD, char*);
#endif
}
#endif // #ifndef __WIN_H__

View File

@ -35,7 +35,7 @@ More Info:
#include "Prometheus.h"
#include <string> // Used for basic string functionality
#include <iostream>
#include <windows.h>
#include "win.h" // REMOVEME
#include <TCHAR.h> // TCHAR of course
#include <cstdlib>
using namespace std;

View File

@ -38,16 +38,16 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ps_dbg.exe"
OutputFile="$(OutDir)/ps_dbg.vc7.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/ps_dbg.pdb"
ProgramDatabaseFile="$(OutDir)/ps_dbg.vc7.pdb"
SubSystem="2"
EntryPointSymbol="entry"
TargetMachine="1">
<IntelOptions
AllOptions="/NOLOGO /OUT:&quot;..\..\binaries/ps_dbg.exe&quot; /INCREMENTAL /DEBUG /PDB:&quot;..\..\binaries/ps_dbg.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /ENTRY:&quot;entry&quot; /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
AllOptions="/NOLOGO /OUT:&quot;..\..\binaries/ps_dbg.vc7.exe&quot; /INCREMENTAL /DEBUG /PDB:&quot;..\..\binaries/ps_dbg.vc7.pdb&quot; /SUBSYSTEM:WINDOWS /TLBID:1 /ENTRY:&quot;entry&quot; /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
Name="VCMIDLTool"/>
@ -93,17 +93,18 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/ps.exe"
OutputFile="$(OutDir)/ps.vc7.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/ps.vc7.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
EntryPointSymbol="entry"
TargetMachine="1">
<IntelOptions
AllOptions="/NOLOGO /OUT:&quot;..\..\binaries/ps.exe&quot; /INCREMENTAL:NO /DEBUG /PDB:&quot;..\..\binaries/ps.pdb&quot; /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /ENTRY:&quot;entry&quot; /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
AllOptions="/NOLOGO /OUT:&quot;..\..\binaries/ps.vc7.exe&quot; /INCREMENTAL:NO /DEBUG /PDB:&quot;..\..\binaries/ps.vc7.pdb&quot; /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /ENTRY:&quot;entry&quot; /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
Name="VCMIDLTool"/>