From 6b5989a39961f1701ae67da63b532f79f187aab6 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 1 Feb 2006 09:01:12 +0000 Subject: [PATCH] Updated exports --- src/main/beos/exports/Makefile | 5 +++-- src/main/beos/exports/SDL.exp | 3 --- src/main/beos/exports/genexp.pl | 12 ++++++++++-- src/main/macos/exports/Makefile | 2 +- src/main/macos/exports/gendef.pl | 10 ++++++++-- src/main/macosx/exports/Makefile | 3 ++- src/main/macosx/exports/SDL.x | 4 ++-- src/main/macosx/exports/gendef.pl | 16 +++++++++++----- src/main/win32/exports/Makefile | 4 ++-- src/main/win32/exports/SDL.def | 6 +++--- src/main/win32/exports/gendef.pl | 12 +++++++++--- 11 files changed, 51 insertions(+), 26 deletions(-) diff --git a/src/main/beos/exports/Makefile b/src/main/beos/exports/Makefile index 595f5a6c6..735747828 100644 --- a/src/main/beos/exports/Makefile +++ b/src/main/beos/exports/Makefile @@ -11,11 +11,11 @@ HEADERS = \ ../../../../include/SDL_endian.h \ ../../../../include/SDL_error.h \ ../../../../include/SDL_events.h \ + ../../../../include/SDL_getenv.h \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ ../../../../include/SDL_loadso.h \ - ../../../../include/SDL_main.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ ../../../../include/SDL_quit.h \ @@ -27,9 +27,10 @@ HEADERS = \ ../../../../include/SDL_version.h \ ../../../../include/SDL_video.h + all: $(EXPORTS) -$(EXPORTS): $(HEADERS) +$(EXPORTS): Makefile genexp.pl $(HEADERS) perl genexp.pl $(HEADERS) >$@ || rm $@ clean: diff --git a/src/main/beos/exports/SDL.exp b/src/main/beos/exports/SDL.exp index ea3c9cbc2..609f3851f 100644 --- a/src/main/beos/exports/SDL.exp +++ b/src/main/beos/exports/SDL.exp @@ -86,9 +86,6 @@ _SDL_GetKeyName _SDL_LoadObject _SDL_LoadFunction _SDL_UnloadObject -_SDL_SetModuleHandle -_SDL_RegisterApp -_SDL_InitQuickDraw _SDL_GetMouseState _SDL_GetRelativeMouseState _SDL_WarpMouse diff --git a/src/main/beos/exports/genexp.pl b/src/main/beos/exports/genexp.pl index 98331bba2..1212acf9c 100755 --- a/src/main/beos/exports/genexp.pl +++ b/src/main/beos/exports/genexp.pl @@ -2,6 +2,11 @@ # # Program to take a set of header files and generate MWCC export definitions +# Special exports to ignore for this platform +$exclude{"SDL_putenv"} = 1; +$exclude{"SDL_getenv"} = 1; +$exclude{"SDL_CreateThread_Core"} = 1; + while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { warn "Couldn't open $file: $!\n"; @@ -10,9 +15,12 @@ $file =~ s,.*/,,; while () { if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) { - print "_$1\n"; + if ( not $exclude{$1} ) { + print "_$1\n"; + } } } close(FILE); } -# Special exports not public in the header files + +# Special exports to include for this platform diff --git a/src/main/macos/exports/Makefile b/src/main/macos/exports/Makefile index a7d193683..3df3ed1b6 100644 --- a/src/main/macos/exports/Makefile +++ b/src/main/macos/exports/Makefile @@ -30,7 +30,7 @@ HEADERS = \ all: $(EXPORTS) -$(EXPORTS): $(HEADERS) +$(EXPORTS): Makefile gendef.pl $(HEADERS) perl gendef.pl $(HEADERS) >$@ || rm $@ clean: diff --git a/src/main/macos/exports/gendef.pl b/src/main/macos/exports/gendef.pl index 72f6bf453..942214b0a 100644 --- a/src/main/macos/exports/gendef.pl +++ b/src/main/macos/exports/gendef.pl @@ -2,6 +2,9 @@ # # Program to take a set of header files and generate DLL export definitions +# Special exports to ignore for this platform +$exclude{"SDL_CreateThread_Core"} = 1; + while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { warn "Couldn't open $file: $!\n"; @@ -11,10 +14,13 @@ $file =~ s,.*/,,; while () { if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) { - print "\t$1\n"; + if ( not $exclude{$1} ) { + print "\t$1\n"; + } } } close(FILE); } -# Special exports not in the header files + +# Special exports to include for this platform print "\tSDL_InitQuickDraw\n"; diff --git a/src/main/macosx/exports/Makefile b/src/main/macosx/exports/Makefile index c8973f37e..3df3ed1b6 100644 --- a/src/main/macosx/exports/Makefile +++ b/src/main/macosx/exports/Makefile @@ -11,6 +11,7 @@ HEADERS = \ ../../../../include/SDL_endian.h \ ../../../../include/SDL_error.h \ ../../../../include/SDL_events.h \ + ../../../../include/SDL_getenv.h \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ @@ -29,7 +30,7 @@ HEADERS = \ all: $(EXPORTS) -$(EXPORTS): $(HEADERS) +$(EXPORTS): Makefile gendef.pl $(HEADERS) perl gendef.pl $(HEADERS) >$@ || rm $@ clean: diff --git a/src/main/macosx/exports/SDL.x b/src/main/macosx/exports/SDL.x index 9e6804c86..22e8d5a66 100644 --- a/src/main/macosx/exports/SDL.x +++ b/src/main/macosx/exports/SDL.x @@ -1,5 +1,3 @@ - .objc_class_name_SDL_QuartzWindow - .objc_class_name_SDL_QuartzWindowDelegate _SDL_Init _SDL_InitSubSystem _SDL_QuitSubSystem @@ -188,3 +186,5 @@ _SDL_WM_ToggleFullScreen _SDL_WM_GrabInput _SDL_SoftStretch + .objc_class_name_SDL_QuartzWindow + .objc_class_name_SDL_QuartzWindowDelegate diff --git a/src/main/macosx/exports/gendef.pl b/src/main/macosx/exports/gendef.pl index 8793278ca..26fe6736b 100644 --- a/src/main/macosx/exports/gendef.pl +++ b/src/main/macosx/exports/gendef.pl @@ -2,21 +2,27 @@ # # Program to take a set of header files and generate DLL export definitions -# print objective-c exports -print "\t.objc_class_name_SDL_QuartzWindow\n"; -print "\t.objc_class_name_SDL_QuartzWindowDelegate\n"; +# Special exports to ignore for this platform +$exclude{"SDL_putenv"} = 1; +$exclude{"SDL_getenv"} = 1; +$exclude{"SDL_CreateThread_Core"} = 1; while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { warn "Couldn't open $file: $!\n"; next; } - $printed_header = 0; $file =~ s,.*/,,; while () { if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) { - print "\t_$1\n"; + if ( not $exclude{$1} ) { + print "\t_$1\n"; + } } } close(FILE); } + +# Special exports to include for this platform +print "\t.objc_class_name_SDL_QuartzWindow\n"; +print "\t.objc_class_name_SDL_QuartzWindowDelegate\n"; diff --git a/src/main/win32/exports/Makefile b/src/main/win32/exports/Makefile index 89163c8d5..8bc67f397 100644 --- a/src/main/win32/exports/Makefile +++ b/src/main/win32/exports/Makefile @@ -11,11 +11,11 @@ HEADERS = \ ../../../../include/SDL_endian.h \ ../../../../include/SDL_error.h \ ../../../../include/SDL_events.h \ + ../../../../include/SDL_getenv.h \ ../../../../include/SDL_joystick.h \ ../../../../include/SDL_keyboard.h \ ../../../../include/SDL_keysym.h \ ../../../../include/SDL_loadso.h \ - ../../../../include/SDL_main.h \ ../../../../include/SDL_mouse.h \ ../../../../include/SDL_mutex.h \ ../../../../include/SDL_quit.h \ @@ -30,7 +30,7 @@ HEADERS = \ all: $(EXPORTS) -$(EXPORTS): $(HEADERS) +$(EXPORTS): Makefile gendef.pl $(HEADERS) perl gendef.pl $(HEADERS) >$@ || rm $@ clean: diff --git a/src/main/win32/exports/SDL.def b/src/main/win32/exports/SDL.def index 4387617ab..7b251a8bc 100644 --- a/src/main/win32/exports/SDL.def +++ b/src/main/win32/exports/SDL.def @@ -61,6 +61,8 @@ SDL_SetEventFilter SDL_GetEventFilter SDL_EventState + SDL_putenv + SDL_getenv SDL_NumJoysticks SDL_JoystickName SDL_JoystickOpen @@ -86,9 +88,6 @@ SDL_LoadObject SDL_LoadFunction SDL_UnloadObject - SDL_SetModuleHandle - SDL_RegisterApp - SDL_InitQuickDraw SDL_GetMouseState SDL_GetRelativeMouseState SDL_WarpMouse @@ -191,3 +190,4 @@ SDL_SoftStretch SDL_RegisterApp SDL_SetModuleHandle + SDL_UnregisterApp diff --git a/src/main/win32/exports/gendef.pl b/src/main/win32/exports/gendef.pl index 4fed9bc1f..b2eb9321b 100755 --- a/src/main/win32/exports/gendef.pl +++ b/src/main/win32/exports/gendef.pl @@ -2,20 +2,26 @@ # # Program to take a set of header files and generate DLL export definitions +# Special exports to ignore for this platform +$exclude{"SDL_CreateThread_Core"} = 1; + while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { warn "Couldn't open $file: $!\n"; next; } - $printed_header = 0; $file =~ s,.*/,,; while () { if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) { - print "\t$1\n"; + if ( not $exclude{$1} ) { + print "\t$1\n"; + } } } close(FILE); } -# Special exports not in the header files + +# Special exports to include for this platform print "\tSDL_RegisterApp\n"; print "\tSDL_SetModuleHandle\n"; +print "\tSDL_UnregisterApp\n";