Don't write errors to stderr in dlopen(3) and dlsym(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2013-08-19 17:30:49 +02:00
parent 30d35a98dd
commit 930be00966
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/******************************************************************************* /*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2012. Copyright(C) Jonas 'Sortie' Termansen 2012, 2013.
This file is part of the Sortix C Library. This file is part of the Sortix C Library.
@ -29,17 +29,17 @@ static const char* dlerrormsg = NULL;
extern "C" void* dlopen(const char* filename, int mode) extern "C" void* dlopen(const char* filename, int mode)
{ {
(void) filename;
(void) mode; (void) mode;
dlerrormsg = "Sortix does not yet support dynamic linking"; dlerrormsg = "Sortix does not yet support dynamic linking";
fprintf(stderr, "%s: loading file: %s\n", dlerrormsg, filename);
return NULL; return NULL;
} }
extern "C" void* dlsym(void* handle, const char* name) extern "C" void* dlsym(void* handle, const char* name)
{ {
(void) handle; (void) handle;
(void) name;
dlerrormsg = "Sortix does not yet support dynamic linking"; dlerrormsg = "Sortix does not yet support dynamic linking";
fprintf(stderr, "%s: resolving symbol: %s\n", dlerrormsg, name);
return NULL; return NULL;
} }