src/loadso/macosx/SDL_sysloadso.c
changeset 1648 9f59d4c5aaea
parent 1635 92947e3a18db
child 1790 828a17e05192
--- a/src/loadso/macosx/SDL_sysloadso.c	Thu Apr 20 16:33:51 2006 +0000
+++ b/src/loadso/macosx/SDL_sysloadso.c	Sat Apr 22 19:17:14 2006 +0000
@@ -109,7 +109,7 @@
 #endif /* ! _POSIX_SOURCE */
 
 static int SDL_OSX_dlclose(void * handle);
-static char * SDL_OSX_dlerror(void);
+static const char * SDL_OSX_dlerror(void);
 static void * SDL_OSX_dlopen(const char *path, int mode);
 static void * SDL_OSX_dlsym(void * dl_restrict handle, const char * dl_restrict symbol);
 
@@ -249,7 +249,7 @@
 static void resetdlerror(void);
 static const struct mach_header *my_find_image(const char *name);
 static const struct mach_header *image_for_address(const void *address);
-static inline const char *dyld_error_str(void);
+static inline char *dyld_error_str(void);
 
 #if FINK_BUILD
 /* Two Global Functions */
@@ -623,7 +623,7 @@
 }
 
 /* Up to the caller to SDL_free() returned string */
-static inline const char *dyld_error_str()
+static inline char *dyld_error_str()
 {
 	NSLinkEditErrors dylder;
 	int dylderno;
@@ -647,7 +647,7 @@
 	void *caller = NULL;
 #endif
 	const struct mach_header *caller_mh = 0;
-	char* savedErrorStr = NULL;
+	char *savedErrorStr = NULL;
 	resetdlerror();
 #ifndef RTLD_SELF
 #define	RTLD_SELF		((void *) -3)
@@ -1168,7 +1168,7 @@
 	return 1;
 }
 
-static char *SDL_OSX_dlerror(void)
+static const char *SDL_OSX_dlerror(void)
 {
 	struct dlthread  *tss;
 	const char * err_str = NULL;
@@ -1378,7 +1378,7 @@
 void *SDL_LoadObject(const char *sofile)
 {
 	void *handle = SDL_OSX_dlopen(sofile, RTLD_NOW);
-	const char *loaderror = (char *)SDL_OSX_dlerror();
+	const char *loaderror = SDL_OSX_dlerror();
 	if ( handle == NULL ) {
 		SDL_SetError("Failed loading %s: %s", sofile, loaderror);
 	}
@@ -1389,7 +1389,7 @@
 {
 	void *symbol = SDL_OSX_dlsym(handle, name);
 	if ( symbol == NULL ) {
-		SDL_SetError("Failed loading %s: %s", name, (const char *)SDL_OSX_dlerror());
+		SDL_SetError("Failed loading %s: %s", name, SDL_OSX_dlerror());
 	}
 	return(symbol);
 }