src/platform.h

Go to the documentation of this file.
00001 ///
00002 /// \file       src/platform.h
00003 ///             Platform-specific details for the Barry library
00004 ///
00005 
00006 /*
00007     Copyright (C) 2010-2012, Net Direct Inc. (http://www.netdirect.ca/)
00008     Copyright (C) 2010, RealVNC Ltd.
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 
00019     See the GNU General Public License in the COPYING file at the
00020     root directory of this project for more details.
00021 */
00022 
00023 #ifndef __BARRY_PLATFORM_H__
00024 #define __BARRY_PLATFORM_H__
00025 
00026 #include <pthread.h>                    // threading and struct timespec
00027 
00028 //////////////////////////////////////////////////////////////////////////////
00029 // All GCC specific detail
00030 #if defined( __GNUC__ )
00031 
00032 #define ATTRIBUTE_PACKED __attribute__ ((packed))
00033 #define USE_PACK_PRAGMA 0
00034 
00035 #else
00036 
00037 #define ATTRIBUTE_PACKED
00038 #define USE_PACK_PRAGMA 1
00039 
00040 #endif
00041 
00042 //////////////////////////////////////////////////////////////////////////////
00043 // All Windows specific detail
00044 #if defined( WIN32 )
00045 
00046 // On Windows, we must call usb_set_configuration() before claim_interface()
00047 #define MUST_SET_CONFIGURATION 1
00048 
00049 #else
00050 
00051 #define MUST_SET_CONFIGURATION 0
00052 
00053 #endif
00054 
00055 
00056 
00057 //////////////////////////////////////////////////////////////////////////////
00058 // All FreeBSD / BSD specific detail
00059 #if defined( __FreeBSD__ )
00060 
00061 #endif
00062 
00063 
00064 
00065 
00066 //////////////////////////////////////////////////////////////////////////////
00067 // All Mac OS X specific detail
00068 #if defined( __APPLE__ ) && defined( __MACH__ )
00069 
00070 #endif
00071 
00072 
00073 
00074 #endif
00075