00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __misc_h__
00013 #define __misc_h__
00014
00015 #ifdef __cplusplus
00016 extern "C"
00017 {
00018 #endif
00019
00020
00021
00022
00023
00024
00025
00026
00027 #if defined __GNUC__ && (! defined (__sun)) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
00028 #define INTERNAL __attribute__ ((visibility("hidden")))
00029 #define PCSC_API __attribute__ ((visibility("default")))
00030 #elif (! defined __GNUC__ ) && defined (__sun)
00031
00032 #define INTERNAL __hidden
00033 #define PCSC_API __global
00034 #else
00035 #define INTERNAL
00036 #define PCSC_API
00037 #endif
00038 #define EXTERNAL PCSC_API
00039
00040 #if defined __GNUC__
00041
00042
00043 #define CONSTRUCTOR __attribute__ ((constructor))
00044 #define DESTRUCTOR __attribute__ ((destructor))
00045
00046 #else
00047
00048
00049
00050
00051
00052
00053
00054 #define CONSTRUCTOR
00055 #define DESTRUCTOR
00056
00057 #endif
00058
00059 #ifndef min
00060 #define min(a,b) (((a) < (b)) ? (a) : (b))
00061 #endif
00062
00063 #ifdef __cplusplus
00064 }
00065 #endif
00066
00067 #endif