Partial commit of OpenBSD fixes by Thorsten Glaser and someone else whose

name I don't know, more to follow.
This commit is contained in:
theoddone33
2002-05-14 18:35:18 +00:00
parent 79f8ff7c2f
commit cd41fa6c39
6 changed files with 23 additions and 6 deletions

View File

@@ -5,3 +5,4 @@
#undef HAVE_SYS_DIR_H #undef HAVE_SYS_DIR_H
#undef HAVE_NDIR_H #undef HAVE_NDIR_H
#undef HAVE_MEMCPY #undef HAVE_MEMCPY
#undef HAVE_UNISTD_H

View File

@@ -27,6 +27,10 @@ case "$target" in
CFLAGS="$CFLAGS -D__LINUX__" CFLAGS="$CFLAGS -D__LINUX__"
NFLAGS="$NFLAGS -D__LINUX__ -f elf" NFLAGS="$NFLAGS -D__LINUX__ -f elf"
;; ;;
*-*-*openbsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -D__OpenBSD__ -f aoutb"
;;
*-*-*bsd*) *-*-*bsd*)
CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__" CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__"
NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf" NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -f elf"
@@ -114,6 +118,10 @@ if test x$with_png != xno; then
else else
AC_MSG_RESULT(disabled by user) AC_MSG_RESULT(disabled by user)
fi fi
if test x$with_png != xyes; then
CFLAGS="$CFLAGS -DNO_PNG"
NFLAGS="$NFLAGS -DNO_PNG"
fi
dnl -- Various debug and optimization option checks dnl -- Various debug and optimization option checks
AC_ARG_ENABLE(debug, [ --enable-debug Build GDB Friendly binary (zsnes-debug) ],debug=yes) AC_ARG_ENABLE(debug, [ --enable-debug Build GDB Friendly binary (zsnes-debug) ],debug=yes)

View File

@@ -98,14 +98,16 @@
#include <glob.h> #include <glob.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h> #include <netdb.h>
#include <utime.h> #include <utime.h>
#include <zlib.h> #include <zlib.h>
#include <png.h> #ifndef NO_PNG
#include <png.h>
#endif
#endif #endif
#ifdef __LINUX__ #ifdef __LINUX__

View File

@@ -33,7 +33,9 @@ EXTSYM Clear2xSaIBuffer
EXTSYM romdata,romtype,ScreenShotFormat EXTSYM romdata,romtype,ScreenShotFormat
EXTSYM Voice0Disable,Voice1Disable,Voice2Disable,Voice3Disable EXTSYM Voice0Disable,Voice1Disable,Voice2Disable,Voice3Disable
EXTSYM Voice4Disable,Voice5Disable,Voice6Disable,Voice7Disable EXTSYM Voice4Disable,Voice5Disable,Voice6Disable,Voice7Disable
%ifndef NO_PNG
EXTSYM Grab_PNG_Data EXTSYM Grab_PNG_Data
%endif
NEWSYM MenuAsmStart NEWSYM MenuAsmStart
@@ -184,9 +186,11 @@ NEWSYM showmenu
.nomenuinc3 .nomenuinc3
mov dword[menudrawbox8b.stringi+13],' BMP' mov dword[menudrawbox8b.stringi+13],' BMP'
%ifndef NO_PNG
cmp byte[ScreenShotFormat],0 cmp byte[ScreenShotFormat],0
je .normalscrn je .normalscrn
mov dword[menudrawbox8b.stringi+13],' PNG' mov dword[menudrawbox8b.stringi+13],' PNG'
%endif
.normalscrn .normalscrn
cmp byte[cbitmode],1 cmp byte[cbitmode],1
je near .nopcx je near .nopcx
@@ -1068,11 +1072,13 @@ NEWSYM pcxheader
NEWSYM picnum, dw 0 NEWSYM picnum, dw 0
NEWSYM savepcx NEWSYM savepcx
%ifndef NO_PNG
cmp byte[ScreenShotFormat],1 cmp byte[ScreenShotFormat],1
jne .notpng jne .notpng
call Grab_PNG_Data call Grab_PNG_Data
ret ret
.notpng .notpng
%endif
mov byte[pressed+1],0 mov byte[pressed+1],0
mov byte[pressed+59],0 mov byte[pressed+59],0

View File

@@ -69,7 +69,7 @@ BOOL sw_start(int width, int height, int req_depth, int FullScreen)
// Grab mouse in fullscreen mode // Grab mouse in fullscreen mode
FullScreen ? SDL_WM_GrabInput(SDL_GRAB_ON) : SDL_WM_GrabInput(SDL_GRAB_OFF); FullScreen ? SDL_WM_GrabInput(SDL_GRAB_ON) : SDL_WM_GrabInput(SDL_GRAB_OFF);
SDL_WM_SetCaption ("ZSNES Linux","ZSNES"); SDL_WM_SetCaption ("ZSNES","ZSNES");
SDL_ShowCursor(0); SDL_ShowCursor(0);
// Check hardware for 565/555 // Check hardware for 565/555

View File

@@ -152,7 +152,7 @@ NEWSYM welcome
db 'ZSNES v1.',ZVERSION,' beta (c) 1997-2002, ZSNES Team (zsKnight & _Demo_)',13,10 db 'ZSNES v1.',ZVERSION,' beta (c) 1997-2002, ZSNES Team (zsKnight & _Demo_)',13,10
%ifdef __LINUX__ %ifdef __LINUX__
db 'Compiled under NASM and GCC. (Linux/FreeBSD)',13,10,13,10 db 'Compiled under NASM and GCC. (*nix)',13,10,13,10
%else %else
%ifdef __WIN32__ %ifdef __WIN32__
db 'Compiled under NASM and MSVC++. (Windows)',13,10,13,10 db 'Compiled under NASM and MSVC++. (Windows)',13,10,13,10