[xiph-cvs] cvs commit: ao/src audio_out.c ao_private.h
Stan Seibert
volsung at xiph.org
Wed Jul 25 13:54:44 PDT 2001
volsung 01/07/25 13:54:43
Modified: src Tag: volsung_20010721 audio_out.c ao_private.h
Log:
Moved #ifdefs to header file as per Jack's suggestion.
Revision Changes Path
No revision
No revision
1.15.2.6 +2 -14 ao/src/audio_out.c
Index: audio_out.c
===================================================================
RCS file: /usr/local/cvsroot/ao/src/audio_out.c,v
retrieving revision 1.15.2.5
retrieving revision 1.15.2.6
diff -u -r1.15.2.5 -r1.15.2.6
--- audio_out.c 2001/07/25 19:55:29 1.15.2.5
+++ audio_out.c 2001/07/25 20:54:43 1.15.2.6
@@ -90,26 +90,14 @@
/* Load a plugin from disk and put the function table into a driver_list
- struct.
+ struct. */
- OpenBSD systems with a.out binaries require dlsym()ed symbols to be
- prepended with an underscore, so we need the following nasty #ifdef
- hack. */
-#if defined(__OpenBSD__) && !defined(__ELF__)
-#define dlsym(h,s) dlsym(h, "_" s)
-#endif
driver_list *_get_plugin(char *plugin_file)
{
driver_list *dt;
void *handle;
- /* RTLD_NOW is the preferred symbol resolution behavior, but
- some platforms do not support it. */
-#if defined(__OpenBSD__)
- handle = dlopen(plugin_file, RTLD_LAZY);
-#else
- handle = dlopen(plugin_file, RTLD_NOW);
-#endif
+ handle = dlopen(plugin_file, DLOPEN_FLAG /* See ao_private.h */);
if (handle) {
dt = (driver_list *)malloc(sizeof(driver_list));
1.1.2.2 +19 -0 ao/src/Attic/ao_private.h
Index: ao_private.h
===================================================================
RCS file: /usr/local/cvsroot/ao/src/Attic/ao_private.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- ao_private.h 2001/07/22 03:35:48 1.1.2.1
+++ ao_private.h 2001/07/25 20:54:43 1.1.2.2
@@ -26,6 +26,25 @@
#ifndef __AO_PRIVATE_H__
#define __AO_PRIVATE_H__
+/* --- Operating System Compatibility --- */
+
+/*
+ OpenBSD systems with a.out binaries require dlsym()ed symbols to be
+ prepended with an underscore, so we need the following nasty #ifdef
+ hack.
+*/
+#if defined(__OpenBSD__) && !defined(__ELF__)
+#define dlsym(h,s) dlsym(h, "_" s)
+#endif
+
+/* RTLD_NOW is the preferred symbol resolution behavior, but
+ some platforms do not support it. */
+#if defined(__OpenBSD__)
+#define DLOPEN_FLAG RTLD_LAZY
+#else
+#define DLOPEN_FLAG RTLD_NOW
+#endif
+
/* --- Constants --- */
#ifndef AO_SYSTEM_CONFIG
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list