Made winebuild (almost) compile and work on Windows.

This commit is contained in:
Patrik Stridvall 2002-03-11 05:09:02 +00:00 committed by Alexandre Julliard
parent 136fae57c3
commit 235da7975b
10 changed files with 62 additions and 16 deletions

View File

@ -29,6 +29,60 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_DIRECT_H
# include <direct.h>
#endif
#ifdef HAVE_IO_H
# include <io.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#if !defined(HAVE_POPEN) && defined(HAVE__POPEN)
#define popen _popen
#endif
#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
#define pclose _pclose
#endif
#if !defined(HAVE_STRNCASECMP) && defined(HAVE__STRNICMP)
# define strncasecmp _strnicmp
#endif
#if !defined(HAVE_STRCASECMP) && defined(HAVE__STRICMP)
# define strcasecmp _stricmp
#endif
#define PUT_WORD(ptr, w) (*(WORD *)(ptr) = (w))
#define PUT_LE_WORD(ptr, w) \
do { ((BYTE *)(ptr))[0] = LOBYTE(w); \
((BYTE *)(ptr))[1] = HIBYTE(w); } while (0)
#define PUT_BE_WORD(ptr, w) \
do { ((BYTE *)(ptr))[1] = LOBYTE(w); \
((BYTE *)(ptr))[0] = HIBYTE(w); } while (0)
#if defined(ALLOW_UNALIGNED_ACCESS)
#define PUT_UA_WORD(ptr, w) PUT_WORD(ptr, w)
#elif defined(WORDS_BIGENDIAN)
#define PUT_UA_WORD(ptr, w) PUT_BE_WORD(ptr, w)
#else
#define PUT_UA_WORD(ptr, w) PUT_LE_WORD(ptr, w)
#endif
#ifdef NEED_UNDERSCORE_PREFIX
# define __ASM_NAME(name) "_" name
#else
# define __ASM_NAME(name) name
#endif
#ifdef NEED_TYPE_IN_DEF
# define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
#else
# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
#endif
#ifdef NEED_UNDERSCORE_PREFIX
# define PREFIX "_"

View File

@ -23,10 +23,8 @@
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "winnt.h"
#include "build.h"
struct import

View File

@ -26,11 +26,9 @@
#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "winnt.h"
#include "build.h"
ORDDEF *EntryPoints[MAX_ORDINALS];

View File

@ -29,7 +29,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "winbase.h"
#include "build.h"

View File

@ -25,9 +25,7 @@
#include "config.h"
#include <ctype.h>
#include <unistd.h>
#include "winnt.h"
#include "thread.h"
#include "stackframe.h"

View File

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>

View File

@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>

View File

@ -23,7 +23,6 @@
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>

View File

@ -26,7 +26,6 @@
#include <assert.h>
#include <ctype.h>
#include <unistd.h>
#include <string.h>
#include "winbase.h"
@ -439,12 +438,16 @@ void BuildSpec32File( FILE *outfile )
#ifdef HAVE_GETPAGESIZE
page_size = getpagesize();
#else
# ifdef __svr4__
#elif defined(__svr4__)
page_size = sysconf(_SC_PAGESIZE);
# else
#elif defined(_WINDOWS)
{
SYSTEM_INFO si;
GetSystemInfo(&si);
page_size = si.dwPageSize;
}
#else
# error Cannot get the page size on this platform
# endif
#endif
AssignOrdinals();

View File

@ -25,7 +25,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "build.h"