head 1.6; access; symbols volsung_20010721:1.1.0.2; locks; strict; comment @ * @; 1.6 date 2001.12.17.14.06.50; author volsung; state Exp; branches; next 1.5; 1.5 date 2001.12.07.01.45.27; author jack; state Exp; branches; next 1.4; 1.4 date 2001.08.31.16.10.32; author volsung; state Exp; branches; next 1.3; 1.3 date 2001.08.13.05.24.04; author volsung; state Exp; branches; next 1.2; 1.2 date 2001.08.04.02.56.14; author volsung; state Exp; branches; next 1.1; 1.1 date 2001.07.22.03.35.48; author volsung; state dead; branches 1.1.2.1; next ; 1.1.2.1 date 2001.07.22.03.35.48; author volsung; state Exp; branches; next 1.1.2.2; 1.1.2.2 date 2001.07.25.20.54.43; author volsung; state Exp; branches; next ; desc @@ 1.6 log @OpenBSD compatibility fix. @ text @/* * * ao_private.c * * Copyright (C) Stan Seibert - July 2001 * * This file is part of libao, a cross-platform audio output library. See * README for a history of this source code. * * libao is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * libao 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * */ #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. * * ALSA requires RTLD_GLOBAL. */ #if defined(__OpenBSD__) #define DLOPEN_FLAG (RTLD_LAZY) #else #define DLOPEN_FLAG (RTLD_NOW | RTLD_GLOBAL) #endif /* --- Constants --- */ #ifndef AO_SYSTEM_CONFIG #define AO_SYSTEM_CONFIG "/etc/libao.conf" #endif #ifndef AO_USER_CONFIG #define AO_USER_CONFIG "/.libao" #endif /* --- Structures --- */ typedef struct ao_config { char *default_driver; } ao_config; /* --- Functions --- */ void read_config_files (ao_config *config); int read_config_file(ao_config *config, const char *config_file); #endif /* __AO_PRIVATE_H__ */ @ 1.5 log @ALSA requires RTLD_GLOBAL for dlopen(). @ text @d46 1 a46 1 #define DLOPEN_FLAG (RTLD_LAZY | RTLD_GLOBAL) @ 1.4 log @Adds the ALSA 0.9.x plugin contributed by Bill Currie . @ text @d41 4 a44 1 some platforms do not support it. */ d46 1 a46 1 #define DLOPEN_FLAG RTLD_LAZY @ 1.3 log @Default driver is now identified when ao_default_driver_id() is called rather than ao_initialize(). This has the benefit of avoiding autodetection unless is it necessary. @ text @d45 1 a45 1 #define DLOPEN_FLAG RTLD_NOW @ 1.2 log @Merger of new API branch (volsung_20010721) with head. @ text @a60 1 int default_driver_id; @ 1.1 log @file ao_private.h was initially added on branch volsung_20010721. @ text @d1 69 @ 1.1.2.1 log @Initial branch of libao to new API. Great fear and trembling shall sweep the land... @ text @a0 50 /* * * ao_private.c * * Copyright (C) Stan Seibert - July 2001 * * This file is part of libao, a cross-platform audio output library. See * README for a history of this source code. * * libao is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * libao 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef __AO_PRIVATE_H__ #define __AO_PRIVATE_H__ /* --- Constants --- */ #ifndef AO_SYSTEM_CONFIG #define AO_SYSTEM_CONFIG "/etc/libao.conf" #endif #ifndef AO_USER_CONFIG #define AO_USER_CONFIG "/.libao" #endif /* --- Structures --- */ typedef struct ao_config { char *default_driver; int default_driver_id; } ao_config; /* --- Functions --- */ void read_config_files (ao_config *config); int read_config_file(ao_config *config, const char *config_file); #endif /* __AO_PRIVATE_H__ */ @ 1.1.2.2 log @Moved #ifdefs to header file as per Jack's suggestion. @ text @a28 19 /* --- 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 @