X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1a6944fd74cfb70ace96d60bde31a7c8e0a5896d..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/iodbc/dlf.h diff --git a/src/iodbc/dlf.h b/src/iodbc/dlf.h index 185b478c07..a766ebbe52 100644 --- a/src/iodbc/dlf.h +++ b/src/iodbc/dlf.h @@ -1,35 +1,55 @@ +/* + * dlf.h + * + * $Id$ + * + * Dynamic Library Loader (mapping to SVR4) + * + * The iODBC driver manager. + * + * Copyright (C) 1995 by Ke Jin + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ #ifndef _DLF_H -# define _DLF_H +#define _DLF_H +#include "config.h" +#if defined(HAVE_LIBDL) #define DLDAPI_SVR4_DLFCN - -#ifdef __HPUX__ +#elif defined(HAVE_SHL_LOAD) #define DLDAPI_HP_SHL #endif -#ifdef __AIX__ -#define DLDAPI_AIX_LOAD +#ifdef DLDAPI_SVR4_DLFCN +#include +#elif DLDAPI_AIX_LOAD +#include +#else +extern void FAR *dlopen (char FAR * path, int mode); +extern void FAR *dlsym (void FAR * hdll, char FAR * sym); +extern char FAR *dlerror (); +extern int dlclose (void FAR * hdll); #endif -# include <../iodbc/config.h> -# include <../iodbc/windows.h> - -# ifdef DLDAPI_SVR4_DLFCN -# include -# else - extern void FAR* dlopen(char FAR* path, int mode); - extern void FAR* dlsym(void FAR* hdll, char FAR* sym); - extern char FAR* dlerror(); - extern int dlclose(void FAR* hdll); -# endif - -# ifndef RTLD_LAZY -# define RTLD_LAZY 1 -# endif - -# define DLL_OPEN(dll) (void*)dlopen((char*)(path), RTLD_LAZY) -# define DLL_PROC(hdll, sym) (void*)dlsym((void*)(hdll), (char*)sym) -# define DLL_ERROR() (char*)dlerror() -# define DLL_CLOSE(hdll) dlclose((void*)(hdll)) +#ifndef RTLD_LAZY +#define RTLD_LAZY 1 +#endif +#define DLL_OPEN(dll) (void*)dlopen((char*)(path), RTLD_LAZY) +#define DLL_PROC(hdll, sym) (void*)dlsym((void*)(hdll), (char*)sym) +#define DLL_ERROR() (char*)dlerror() +#define DLL_CLOSE(hdll) dlclose((void*)(hdll)) #endif