// D import file generated from '../../../../libphobos/libdruntime/core/sys/posix/dlfcn.d'
module core.sys.posix.dlfcn;
private import core.sys.posix.config;

version (Posix)
{
	extern (C) version (linux)
	{
		enum RTLD_LAZY = 1;
		enum RTLD_NOW = 2;
		enum RTLD_GLOBAL = 256;
		enum RTLD_LOCAL = 0;
		int dlclose(void*);
		char* dlerror();
		void* dlopen(in char*, int);
		void* dlsym(void*, in char*);
		int dladdr(void* addr, Dl_info* info);
		void* dlvsym(void* handle, in char* symbol, in char* version_);
		struct Dl_info
		{
			const(char)* dli_fname;
			void* dli_fbase;
			const(char)* dli_sname;
			void* dli_saddr;
		}
	}
	else
	{
		version (OSX)
		{
			enum RTLD_LAZY = 1;
			enum RTLD_NOW = 2;
			enum RTLD_GLOBAL = 256;
			enum RTLD_LOCAL = 0;
			int dlclose(void*);
			char* dlerror();
			void* dlopen(in char*, int);
			void* dlsym(void*, in char*);
			int dladdr(void* addr, Dl_info* info);
			struct Dl_info
			{
				const(char)* dli_fname;
				void* dli_fbase;
				const(char)* dli_sname;
				void* dli_saddr;
			}
		}
		else
		{
			version (FreeBSD)
			{
				enum RTLD_LAZY = 1;
				enum RTLD_NOW = 2;
				enum RTLD_GLOBAL = 256;
				enum RTLD_LOCAL = 0;
				int dlclose(void*);
				char* dlerror();
				void* dlopen(in char*, int);
				void* dlsym(void*, in char*);
				int dladdr(const(void)* addr, Dl_info* info);
				struct Dl_info
				{
					const(char)* dli_fname;
					void* dli_fbase;
					const(char)* dli_sname;
					void* dli_saddr;
				}
			}
		}
	}

}
