annotate host/system.h @ 255:88ef5ffdbe8d

* docs
author cannam
date Wed, 12 Nov 2008 14:11:01 +0000
parents ae3e47e76d2d
children
rev   line source
cannam@1 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@1 2
cannam@1 3 /*
cannam@1 4 Vamp
cannam@1 5
cannam@1 6 An API for audio analysis and feature extraction plugins.
cannam@1 7
cannam@1 8 Centre for Digital Music, Queen Mary, University of London.
cannam@1 9 Copyright 2006 Chris Cannam.
cannam@1 10
cannam@1 11 Permission is hereby granted, free of charge, to any person
cannam@1 12 obtaining a copy of this software and associated documentation
cannam@1 13 files (the "Software"), to deal in the Software without
cannam@1 14 restriction, including without limitation the rights to use, copy,
cannam@1 15 modify, merge, publish, distribute, sublicense, and/or sell copies
cannam@1 16 of the Software, and to permit persons to whom the Software is
cannam@1 17 furnished to do so, subject to the following conditions:
cannam@1 18
cannam@1 19 The above copyright notice and this permission notice shall be
cannam@1 20 included in all copies or substantial portions of the Software.
cannam@1 21
cannam@1 22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
cannam@1 23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
cannam@1 24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
cannam@6 25 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
cannam@1 26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
cannam@1 27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
cannam@1 28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
cannam@1 29
cannam@1 30 Except as contained in this notice, the names of the Centre for
cannam@1 31 Digital Music; Queen Mary, University of London; and Chris Cannam
cannam@1 32 shall not be used in advertising or otherwise to promote the sale,
cannam@1 33 use or other dealings in this Software without prior written
cannam@1 34 authorization.
cannam@1 35 */
cannam@1 36
cannam@1 37 #ifndef _SYSTEM_H_
cannam@1 38 #define _SYSTEM_H_
cannam@1 39
cannam@1 40 #ifdef _WIN32
cannam@1 41
cannam@1 42 #include <windows.h>
cannam@1 43
cannam@1 44 #define DLOPEN(a,b) LoadLibrary((a).c_str())
cannam@1 45 #define DLSYM(a,b) GetProcAddress((HINSTANCE)(a),(b))
cannam@1 46 #define DLCLOSE(a) FreeLibrary((HINSTANCE)(a))
cannam@1 47 #define DLERROR() ""
cannam@1 48
cannam@40 49 #define PLUGIN_SUFFIX "dll"
cannam@1 50
cannam@1 51 #else
cannam@1 52
cannam@1 53 #include <dlfcn.h>
cannam@1 54
cannam@1 55 #define DLOPEN(a,b) dlopen((a).c_str(),(b))
cannam@1 56 #define DLSYM(a,b) dlsym((a),(b))
cannam@1 57 #define DLCLOSE(a) dlclose((a))
cannam@1 58 #define DLERROR() dlerror()
cannam@1 59
cannam@10 60 #ifdef __APPLE__
cannam@10 61
cannam@40 62 #define PLUGIN_SUFFIX "dylib"
cannam@40 63 #define HAVE_OPENDIR 1
cannam@10 64
cannam@10 65 #else
cannam@10 66
cannam@40 67 #define PLUGIN_SUFFIX "so"
cannam@40 68 #define HAVE_OPENDIR 1
cannam@1 69
cannam@10 70 #endif /* __APPLE__ */
cannam@10 71
cannam@10 72 #endif /* ! _WIN32 */
cannam@10 73
cannam@1 74 #endif
cannam@1 75