mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-05 20:33:40 +00:00
changes for buildability under MSYS2 mingw32
This commit is contained in:
parent
59ce931955
commit
aeb585527d
@ -79,7 +79,13 @@ extern int my_errno;
|
||||
|
||||
// must hook all other functions that manipulate file names
|
||||
#ifndef NO_POSIX_API_HOOK
|
||||
# ifdef stat
|
||||
# undef stat
|
||||
# endif
|
||||
# define stat my_stat
|
||||
# ifdef fstat
|
||||
# undef fstat
|
||||
# endif
|
||||
# define fstat my_fstat
|
||||
# define open my_open
|
||||
# define rename my_rename
|
||||
@ -88,6 +94,9 @@ extern int my_errno;
|
||||
# define remove my_remove
|
||||
# define creat my_creat
|
||||
# define close my_close
|
||||
# ifdef lseek
|
||||
# undef lseek
|
||||
# endif
|
||||
# define lseek my_lseek
|
||||
# define read my_read
|
||||
# define write my_write
|
||||
@ -125,6 +134,6 @@ struct my_utimbuf
|
||||
};
|
||||
|
||||
// Your compiler may have different "struct stat" -> edit "struct my_stat"
|
||||
#define validate_stat_struct ( sizeof(struct my_stat) == sizeof(struct stat) )
|
||||
#define validate_stat_struct ( sizeof(struct my_stat) == sizeof(struct _stat) )
|
||||
|
||||
#define st_crtime st_ctime
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define _UNICODE
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
||||
#if !defined _MSC_VER && !defined __STDC__
|
||||
|
@ -32,21 +32,6 @@ typedef unsigned long ioctlsockopt_t;
|
||||
# include <winsock2.h>
|
||||
# include <WS2tcpip.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
char * WSAAPI inet_ntop(
|
||||
INT Family,
|
||||
PVOID pAddr,
|
||||
PTSTR pStringBuf,
|
||||
size_t StringBufSize
|
||||
);
|
||||
|
||||
INT WSAAPI inet_pton(
|
||||
INT Family,
|
||||
const char * pszAddrString,
|
||||
PVOID pAddrBuf
|
||||
);
|
||||
#endif
|
||||
|
||||
# include <sys/timeb.h>
|
||||
# include <iphlpapi.h>
|
||||
|
||||
|
@ -99,7 +99,7 @@ links:
|
||||
case $$i in *codegen_x86.h) o=kpx_cpu/src/cpu/jit/x86/codegen_x86.h;; esac; \
|
||||
SUB=`echo $$o | sed 's;[^/]*/;../;g' | sed 's;[^/]*$$;;'` ;\
|
||||
cur_link=src/$$o ;\
|
||||
if [ -d "$$cur_link" ]; then rm -rf "$$cur_link"; fi ;\
|
||||
if [ -e "$$cur_link" ]; then rm -rf "$$cur_link"; fi ;\
|
||||
ln -sf "$$PREFIX$$SUB$(B2_TOPDIR)/src/$$i" $$cur_link; \
|
||||
fi; \
|
||||
done;
|
||||
|
@ -76,6 +76,7 @@ SRCS = ../main.cpp main_windows.cpp ../prefs.cpp ../prefs_items.cpp prefs_window
|
||||
|
||||
UI_SRCS = ../prefs.cpp prefs_windows.cpp prefs_editor_gtk.cpp xpram_windows.cpp \
|
||||
../prefs_items.cpp ../user_strings.cpp user_strings_windows.cpp util_windows.cpp \
|
||||
../dummy/prefs_dummy.cpp \
|
||||
b2ether/packet32.cpp SheepShaverGUI.rc
|
||||
|
||||
UI_APP = SheepShaverGUI.exe
|
||||
|
@ -41,7 +41,9 @@
|
||||
#undef _TEXT
|
||||
#include <time.h>
|
||||
#ifdef __WIN32__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <WinSock2.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user