Portability.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  *                                                                       *
00003  * Open Physics Abstraction Layer                                        *
00004  * Copyright (C) 2004-2005                                               *
00005  * Alan Fischer  alan.fischer@gmail.com                                  *
00006  * Andres Reinot  andres@reinot.com                                      *
00007  * Tyler Streeter  tylerstreeter@gmail.com                               *
00008  * All rights reserved.                                                  *
00009  * Web: opal.sourceforge.net                                             *
00010  *                                                                       *
00011  * This library is free software; you can redistribute it and/or         *
00012  * modify it under the terms of EITHER:                                  *
00013  *   (1) The GNU Lesser General Public License as published by the Free  *
00014  *       Software Foundation; either version 2.1 of the License, or (at  *
00015  *       your option) any later version. The text of the GNU Lesser      *
00016  *       General Public License is included with this library in the     *
00017  *       file license-LGPL.txt.                                          *
00018  *   (2) The BSD-style license that is included with this library in     *
00019  *       the file license-BSD.txt.                                       *
00020  *                                                                       *
00021  * This library is distributed in the hope that it will be useful,       *
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00024  * license-LGPL.txt and license-BSD.txt for more details.                *
00025  *                                                                       *
00026  *************************************************************************/
00027 
00028 #ifndef OPAL_PORTABILITY_H
00029 #define OPAL_PORTABILITY_H
00030 
00031 // Use the standard calling convention for Windows DLLs.
00032 #ifndef OPAL_CALL
00033         #if defined(WIN32) || defined(_WIN32)
00034                 #define OPAL_CALL __stdcall
00035         #else
00036                 #define OPAL_CALL
00037         #endif
00038 #endif
00039 
00040 // DLL import/export macro.
00041 #ifndef OPAL_DECL
00042    #if (defined(WIN32) || defined(_WIN32))
00043       #ifdef OPAL_DLL_EXPORTING
00044          #define OPAL_DECL __declspec(dllexport)
00045       #else
00046             #if !defined(__MINGW32__) && !defined(__CYGWIN__)
00047                 #define OPAL_DECL  __declspec(dllimport)
00048             #else
00049                 #define OPAL_DECL
00050             #endif
00051       #endif
00052    #else
00053       #define OPAL_DECL
00054    #endif
00055 #endif 
00056 
00063 //#define OPAL_EXPORT_FUNCTION(returnType) extern "C" OPAL_DECL returnType OPAL_CALL
00064 #define OPAL_EXPORT_FUNCTION extern "C" OPAL_DECL
00065 
00066 #endif

Generated on Tue May 16 17:49:52 2006 for OPAL by  doxygen 1.4.6-NO