mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
avoid some compiler warnings
fix oen inforrect use of ansi mingw function git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21956 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6fd4ca0d1
commit
38e23cc6cb
5 changed files with 55 additions and 21 deletions
|
@ -151,7 +151,7 @@ _NSLog_standard_printf_handler (NSString* message)
|
||||||
|
|
||||||
if (!eventloghandle)
|
if (!eventloghandle)
|
||||||
{
|
{
|
||||||
eventloghandle = RegisterEventSource(NULL,
|
eventloghandle = RegisterEventSourceW(NULL,
|
||||||
UNISTR([[NSProcessInfo processInfo] processName]));
|
UNISTR([[NSProcessInfo processInfo] processName]));
|
||||||
}
|
}
|
||||||
if (eventloghandle)
|
if (eventloghandle)
|
||||||
|
|
|
@ -39,24 +39,40 @@
|
||||||
#define LINKER_GETSYMBOL 0
|
#define LINKER_GETSYMBOL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
extern long objc_load_module(
|
||||||
|
const unichar *filename,
|
||||||
|
FILE *errorStream,
|
||||||
|
void (*loadCallback)(Class, struct objc_category *),
|
||||||
|
void **header,
|
||||||
|
const unichar *debugFilename);
|
||||||
|
|
||||||
|
extern long objc_load_modules(
|
||||||
|
const unichar *files[],
|
||||||
|
FILE *errorStream,
|
||||||
|
void (*callback)(Class,struct objc_category *),
|
||||||
|
void **header,
|
||||||
|
const unichar *debugFilename);
|
||||||
|
#else
|
||||||
extern long objc_load_module(
|
extern long objc_load_module(
|
||||||
const char *filename,
|
const char *filename,
|
||||||
FILE *errorStream,
|
FILE *errorStream,
|
||||||
void (*loadCallback)(Class, struct objc_category *),
|
void (*loadCallback)(Class, struct objc_category *),
|
||||||
void **header,
|
void **header,
|
||||||
char *debugFilename);
|
const char *debugFilename);
|
||||||
|
|
||||||
|
extern long objc_load_modules(
|
||||||
|
const char *files[],
|
||||||
|
FILE *errorStream,
|
||||||
|
void (*callback)(Class,struct objc_category *),
|
||||||
|
void **header,
|
||||||
|
const char *debugFilename);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern long objc_unload_module(
|
extern long objc_unload_module(
|
||||||
FILE *errorStream,
|
FILE *errorStream,
|
||||||
void (*unloadCallback)(Class, struct objc_category *));
|
void (*unloadCallback)(Class, struct objc_category *));
|
||||||
|
|
||||||
extern long objc_load_modules(
|
|
||||||
char *files[],
|
|
||||||
FILE *errorStream,
|
|
||||||
void (*callback)(Class,struct objc_category *),
|
|
||||||
void **header,
|
|
||||||
char *debugFilename);
|
|
||||||
|
|
||||||
extern long objc_unload_modules(
|
extern long objc_unload_modules(
|
||||||
FILE *errorStream,
|
FILE *errorStream,
|
||||||
void (*unloadCallback)(Class, struct objc_category *));
|
void (*unloadCallback)(Class, struct objc_category *));
|
||||||
|
|
|
@ -145,12 +145,21 @@ objc_load_callback(Class class, struct objc_category * category)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
long
|
||||||
|
objc_load_module (const unichar *filename,
|
||||||
|
FILE *errorStream,
|
||||||
|
void (*loadCallback)(Class, struct objc_category *),
|
||||||
|
void **header,
|
||||||
|
const unichar *debugFilename)
|
||||||
|
#else
|
||||||
long
|
long
|
||||||
objc_load_module (const char *filename,
|
objc_load_module (const char *filename,
|
||||||
FILE *errorStream,
|
FILE *errorStream,
|
||||||
void (*loadCallback)(Class, struct objc_category *),
|
void (*loadCallback)(Class, struct objc_category *),
|
||||||
void **header,
|
void **header,
|
||||||
char *debugFilename)
|
const char *debugFilename)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef NeXT_RUNTIME
|
#ifdef NeXT_RUNTIME
|
||||||
int errcode;
|
int errcode;
|
||||||
|
@ -254,10 +263,17 @@ objc_unload_module(FILE *errorStream,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
long objc_load_modules(char *files[],FILE *errorStream,
|
#if defined(__MINGW32__)
|
||||||
|
long objc_load_modules(const unichar *files[],FILE *errorStream,
|
||||||
void (*callback)(Class,struct objc_category *),
|
void (*callback)(Class,struct objc_category *),
|
||||||
void **header,
|
void **header,
|
||||||
char *debugFilename)
|
const unichar *debugFilename)
|
||||||
|
#else
|
||||||
|
long objc_load_modules(const char *files[],FILE *errorStream,
|
||||||
|
void (*callback)(Class,struct objc_category *),
|
||||||
|
void **header,
|
||||||
|
const char *debugFilename)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
while (*files)
|
while (*files)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,9 +43,9 @@ __objc_dynamic_init(const char* exec_path)
|
||||||
be used to get information about the loded code.
|
be used to get information about the loded code.
|
||||||
*/
|
*/
|
||||||
static dl_handle_t
|
static dl_handle_t
|
||||||
__objc_dynamic_link(const char* module, int mode, const char* debug_file)
|
__objc_dynamic_link(const unichar* module, int mode, const unichar* debug_file)
|
||||||
{
|
{
|
||||||
return LoadLibraryExW((const unichar*)module, 0, 0);
|
return LoadLibraryExW(module, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the address of a symbol given by the name 'symbol' from the module
|
/* Return the address of a symbol given by the name 'symbol' from the module
|
||||||
|
@ -80,7 +80,7 @@ __objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
|
||||||
static void
|
static void
|
||||||
__objc_dynamic_error(FILE *error_stream, const char *error_string)
|
__objc_dynamic_error(FILE *error_stream, const char *error_string)
|
||||||
{
|
{
|
||||||
fprintf(error_stream, "%s:%d\n", error_string, GetLastError());
|
fprintf(error_stream, "%s:%ld\n", error_string, (long)GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Debugging: define these if they are available */
|
/* Debugging: define these if they are available */
|
||||||
|
|
|
@ -53,11 +53,6 @@
|
||||||
#define UNISTR(X) \
|
#define UNISTR(X) \
|
||||||
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
|
((const unichar*)[(X) cStringUsingEncoding: NSUnicodeStringEncoding])
|
||||||
|
|
||||||
/*
|
|
||||||
* Largest chunk of data possible in DO
|
|
||||||
*/
|
|
||||||
static gsu32 maxDataLength = 10 * 1024 * 1024;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define M_LOCK(X) {NSDebugMLLog(@"NSMessagePort",@"lock %@",X); [X lock];}
|
#define M_LOCK(X) {NSDebugMLLog(@"NSMessagePort",@"lock %@",X); [X lock];}
|
||||||
#define M_UNLOCK(X) {NSDebugMLLog(@"NSMessagePort",@"unlock %@",X); [X unlock];}
|
#define M_UNLOCK(X) {NSDebugMLLog(@"NSMessagePort",@"unlock %@",X); [X unlock];}
|
||||||
|
@ -104,6 +99,13 @@ typedef struct {
|
||||||
unsigned char addr[0]; /* name of the port on the local host */
|
unsigned char addr[0]; /* name of the port on the local host */
|
||||||
} GSPortInfo;
|
} GSPortInfo;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Largest chunk of data possible in DO
|
||||||
|
*/
|
||||||
|
static gsu32 maxDataLength = 10 * 1024 * 1024;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Utility functions for encoding and decoding ports.
|
* Utility functions for encoding and decoding ports.
|
||||||
*/
|
*/
|
||||||
|
@ -153,6 +155,7 @@ newDataWithEncodedPort(NSMessagePort *port)
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@implementation NSMessagePort
|
@implementation NSMessagePort
|
||||||
|
|
||||||
|
@ -428,7 +431,6 @@ static unsigned wordAlign;
|
||||||
extra: (void*)extra
|
extra: (void*)extra
|
||||||
forMode: (NSString*)mode
|
forMode: (NSString*)mode
|
||||||
{
|
{
|
||||||
HANDLE h = (HANDLE)(gsaddr)extra;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue