summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in9
-rw-r--r--configure.ac2
-rw-r--r--eagle-internal.h7
-rw-r--r--eagle.c76
-rw-r--r--intel.c2
5 files changed, 54 insertions, 42 deletions
diff --git a/Makefile.in b/Makefile.in
index 4333b39..26c3fdd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -45,7 +45,10 @@ install : libeagle.so eagle.pc
install eagle.pc @libdir@/pkgconfig
clean :
- rm -f *.o glapi/*.o libeagle.so test
+ rm -f *.o glapi/*.o libeagle.so
-Makefile : Makefile.in
- ./config.status
+Makefile : Makefile.in config.status
+ ./config.status $@
+
+config.status : configure.ac
+ ./config.status --recheck
diff --git a/configure.ac b/configure.ac
index 1a751c7..19db90d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(EAGLE, [libdrm dri x11 xfixes xext libudev >= 136])
if test $CC = gcc; then
- GCC_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes"
+ GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
fi
AC_SUBST(GCC_CFLAGS)
diff --git a/eagle-internal.h b/eagle-internal.h
index 1aa2ee5..5d09e8e 100644
--- a/eagle-internal.h
+++ b/eagle-internal.h
@@ -23,6 +23,13 @@
#ifndef _EAGLE_INTERNAL_H_
#define _EAGLE_INTERNAL_H_
+/* GCC visibility */
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define EAGLE_EXPORT __attribute__ ((visibility("default")))
+#else
+#define EAGLE_EXPORT
+#endif
+
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/eagle.c b/eagle.c
index 024b4a7..06c0ce2 100644
--- a/eagle.c
+++ b/eagle.c
@@ -46,7 +46,7 @@ eglSetError(EGLint error)
lastError = error;
}
-EGLint
+EAGLE_EXPORT EGLint
eglGetError()
{
return lastError;
@@ -276,7 +276,7 @@ static const struct dri_driver_entry driver_map[] = {
{ 0, }
};
-EGLDisplay
+EAGLE_EXPORT EGLDisplay
eglCreateDisplayNative(struct udev_device *device)
{
struct udev_device *parent;
@@ -299,13 +299,13 @@ eglCreateDisplayNative(struct udev_device *device)
}
-int
+EAGLE_EXPORT int
eglGetDisplayFD(EGLDisplay display)
{
return display->fd;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglInitialize(EGLDisplay display, EGLint *major, EGLint *minor)
{
if (major != NULL)
@@ -318,13 +318,13 @@ eglInitialize(EGLDisplay display, EGLint *major, EGLint *minor)
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglTerminate(EGLDisplay display)
{
return EGL_TRUE;
}
-const char *
+EAGLE_EXPORT const char *
eglQueryString(EGLDisplay display, EGLint name)
{
if (!display->initialized) {
@@ -343,7 +343,7 @@ eglQueryString(EGLDisplay display, EGLint name)
}
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglGetConfigs(EGLDisplay display, EGLConfig *configs,
EGLint configSize, EGLint *numConfigs)
{
@@ -419,7 +419,7 @@ configMatches(EGLDisplay display,
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglChooseConfig(EGLDisplay display, const EGLint *attribList,
EGLConfig *configs, EGLint configSize, EGLint *numConfigs)
{
@@ -436,7 +436,7 @@ eglChooseConfig(EGLDisplay display, const EGLint *attribList,
return j > 0;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglGetConfigAttrib(EGLDisplay display, EGLConfig config,
EGLint attribute, EGLint *value)
{
@@ -507,7 +507,7 @@ eglGetConfigAttrib(EGLDisplay display, EGLConfig config,
return EGL_TRUE;
}
-void
+EAGLE_EXPORT void
eglInitSurface(EGLSurface surface,
EGLDisplay display, EGLConfig fbconfig, int width, int height)
{
@@ -523,14 +523,14 @@ eglInitSurface(EGLSurface surface,
surface);
}
-EGLSurface
+EAGLE_EXPORT EGLSurface
eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
EGLNativeWindowType win, const EGLint *attribList)
{
return EGL_NO_SURFACE;
}
-EGLSurface
+EAGLE_EXPORT EGLSurface
eglCreatePbufferSurface(EGLDisplay display,
EGLConfig config, const EGLint *attribList)
{
@@ -557,14 +557,14 @@ eglCreatePbufferSurface(EGLDisplay display,
return EGL_NO_SURFACE;
}
-EGLSurface
+EAGLE_EXPORT EGLSurface
eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
EGLNativePixmapType pixmap, const EGLint *attribList)
{
return EGL_NO_SURFACE;
}
-EGLSurface
+EAGLE_EXPORT EGLSurface
eglCreateSurfaceForName(EGLDisplay display, EGLConfig config,
uint32_t name, uint32_t width,
uint32_t height, uint32_t stride, const EGLint *attribList)
@@ -573,7 +573,7 @@ eglCreateSurfaceForName(EGLDisplay display, EGLConfig config,
width, height, stride, attribList);
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglDestroySurface(EGLDisplay display, EGLSurface surface)
{
display->core->destroyDrawable(surface->driDrawable);
@@ -581,21 +581,21 @@ eglDestroySurface(EGLDisplay display, EGLSurface surface)
return display->backend->destroySurface(display, surface);
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
EGLint attribute, EGLint value)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
EGLint attribute, EGLint *value)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglBindTexImage(EGLDisplay display, EGLSurface surface, EGLint buffer)
{
EGLContext context;
@@ -608,13 +608,14 @@ eglBindTexImage(EGLDisplay display, EGLSurface surface, EGLint buffer)
return EGL_TRUE;
}
-EGLBoolean eglReleaseTexImage(EGLDisplay display,
- EGLSurface surface, EGLint buffer)
+EAGLE_EXPORT EGLBoolean
+eglReleaseTexImage(EGLDisplay display, EGLSurface surface, EGLint buffer)
+
{
return EGL_TRUE;
}
-EGLContext
+EAGLE_EXPORT EGLContext
eglCreateContext(EGLDisplay display, EGLConfig config,
EGLContext shared, const EGLint *attribList)
{
@@ -641,7 +642,7 @@ eglCreateContext(EGLDisplay display, EGLConfig config,
return context;
}
-void
+EAGLE_EXPORT void
eglDestroyContext(EGLDisplay display, EGLContext context)
{
if (context == currentContext)
@@ -651,7 +652,7 @@ eglDestroyContext(EGLDisplay display, EGLContext context)
free(context);
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglMakeCurrent(EGLDisplay display,
EGLSurface draw, EGLSurface read, EGLContext context)
{
@@ -674,13 +675,13 @@ eglMakeCurrent(EGLDisplay display,
return status;
}
-EGLContext
+EAGLE_EXPORT EGLContext
eglGetCurrentContext()
{
return currentContext;
}
-EGLSurface
+EAGLE_EXPORT EGLSurface
eglGetCurrentSurface(EGLint readdraw)
{
switch (readdraw) {
@@ -694,13 +695,13 @@ eglGetCurrentSurface(EGLint readdraw)
}
}
-EGLDisplay
+EAGLE_EXPORT EGLDisplay
eglGetCurrentDisplay(void)
{
return currentContext->display;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglQueryContext(EGLDisplay display, EGLContext context,
EGLint attribute, EGLint *value)
{
@@ -727,50 +728,50 @@ eglQueryContext(EGLDisplay display, EGLContext context,
}
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglBindAPI(EGLenum api)
{
return EGL_TRUE;
}
-EGLenum
+EAGLE_EXPORT EGLenum
eglQueryAPI(void)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglWaitClient(void)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglWaitGL(void)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglWaitNative(EGLint engine)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglSwapBuffers(EGLDisplay display, EGLSurface surface)
{
return display->backend->swapBuffers(display, surface);
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglCopyBuffers(EGLDisplay dpy,
EGLSurface surface, EGLNativePixmapType target)
{
return EGL_TRUE;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglSwapInterval(EGLDisplay display, EGLint interval)
{
__DRIdrawable *drawable;
@@ -784,12 +785,13 @@ eglSwapInterval(EGLDisplay display, EGLint interval)
}
}
-void (*eglGetProcAddress(const char *procname))(void)
+EAGLE_EXPORT void
+(*eglGetProcAddress(const char *procname))(void)
{
return NULL;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglCopyNativeBuffers(EGLDisplay display,
EGLSurface dst, GLenum dstBuffer, int32_t dst_x, int32_t dst_y,
EGLSurface src, GLenum srcBuffer, int32_t x, int32_t y, int32_t width, int32_t height)
diff --git a/intel.c b/intel.c
index dfcfdd7..55c584f 100644
--- a/intel.c
+++ b/intel.c
@@ -233,7 +233,7 @@ intelCreateDisplay(struct udev_device *device, const char *driver)
return display;
}
-EGLBoolean
+EAGLE_EXPORT EGLBoolean
eglGetNativeBuffer(EGLSurface surface, GLenum buffer,
uint32_t *name, uint32_t *stride)
{