regex_debug.c: Stop including dlfcn.h

Since the block of code has been disabled anyway and is not very
portable, we introduce a define to control both the include
and the code.
This commit is contained in:
Nicolas Léveillé 2015-08-16 10:22:05 +02:00
parent 102b9593dc
commit 124b4c381b

View file

@ -3,13 +3,16 @@
#include <stdio.h>
#include <stdlib.h>
#define USE_DLADDR (0)
#if USE_DLADDR
// This is some spectacularly non-portable code... but whee!
#include <dlfcn.h>
char* getsym(void* addr) {
#endif
char* getsym(HSVMActionFunc addr) {
char* retstr;
#if 0
#if USE_DLADDR
// This will be fixed later.
Dl_info dli;
if (dladdr(addr, &dli) != 0 && dli.dli_sname != NULL) {