mesa: Delete now unused dlopen.h
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
c17c47207b
commit
8d02abd0fe
|
@ -67,7 +67,6 @@ MAIN_FILES = \
|
|||
main/depth.h \
|
||||
main/dlist.c \
|
||||
main/dlist.h \
|
||||
main/dlopen.h \
|
||||
main/drawpix.c \
|
||||
main/drawpix.h \
|
||||
main/drawtex.c \
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DLOPEN_H
|
||||
#define DLOPEN_H
|
||||
|
||||
/**
|
||||
* Wrapper functions for dlopen(), dlsym(), dlclose().
|
||||
* Note that the #ifdef tests for various environments should be expanded.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_DLOPEN)
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
typedef void (*GenericFunc)(void);
|
||||
|
||||
/**
|
||||
* Wrapper for dlopen().
|
||||
* Note that 'flags' isn't used at this time.
|
||||
*/
|
||||
static inline void *
|
||||
_mesa_dlopen(const char *libname, int flags)
|
||||
{
|
||||
#if defined(HAVE_DLOPEN)
|
||||
flags = RTLD_LAZY | RTLD_GLOBAL; /* Overriding flags at this time */
|
||||
return dlopen(libname, flags);
|
||||
#elif defined(_WIN32)
|
||||
return LoadLibraryA(libname);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for dlsym() that does a cast to a generic function type,
|
||||
* rather than a void *. This reduces the number of warnings that are
|
||||
* generated.
|
||||
*/
|
||||
static inline GenericFunc
|
||||
_mesa_dlsym(void *handle, const char *fname)
|
||||
{
|
||||
union {
|
||||
void *v;
|
||||
GenericFunc f;
|
||||
} u;
|
||||
#if defined(HAVE_DLOPEN)
|
||||
u.v = dlsym(handle, fname);
|
||||
#elif defined(_WIN32)
|
||||
u.v = (void *) GetProcAddress(handle, fname);
|
||||
#else
|
||||
u.v = NULL;
|
||||
#endif
|
||||
return u.f;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for dlclose().
|
||||
*/
|
||||
static inline void
|
||||
_mesa_dlclose(void *handle)
|
||||
{
|
||||
#if defined(HAVE_DLOPEN)
|
||||
dlclose(handle);
|
||||
#elif defined(_WIN32)
|
||||
FreeLibrary(handle);
|
||||
#else
|
||||
(void) handle;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "glheader.h"
|
||||
#include "imports.h"
|
||||
#include "dlopen.h"
|
||||
#include "image.h"
|
||||
#include "macros.h"
|
||||
#include "mtypes.h"
|
||||
|
|
Loading…
Reference in New Issue