core/vidl/vidl_v4l_ulong_fix.h
Go to the documentation of this file.
00001 // This is core/vidl/vidl_v4l_ulong_fix.h
00002 #ifndef vidl_v4l2_ulong_fix_h_
00003 #define vidl_v4l2_ulong_fix_h_
00004 //:
00005 // \file
00006 // \brief Fix system bug where type ulong is not defined in linux/videodev.h on some Linux/GCC combinations.
00007 //
00008 // \author Fred Wheeler
00009 //
00010 // I have found that on a Red Hat Linux 2.6.9 64 bit system with gcc
00011 // 4.3.3, in order to build vidl, you need to #define __USE_MISC before
00012 // #including sys/types.h and you need to make sure sys/types.h is
00013 // #included in order to get ulong typedefed.  ulong is used by
00014 // /usr/include/linux/videodev.h which is included by several VIDL CXX
00015 // files.  I see some indications on the web that this ulong problem
00016 // is a bug with certain Linux/GCC combinations.
00017 //
00018 // This header file implements this fix.  When it is needed it should
00019 // be the first include.
00020 //
00021 // -Fred Wheeler
00022 
00023 #if 1 // #ifdef VXL_VIDL_USE_ULONG_FIX
00024 // We could use this condition to limit use of this fix.
00025 // For now it is enabled for all - change if this fix causes any problems.
00026 
00027 #define __USE_MISC
00028 // including sys/types.h with this define will get ulong typedefed
00029 #include <sys/types.h>
00030 
00031 #endif // VXL_VIDL_USE_ULONG_FIX
00032 
00033 #endif // vidl_v4l2_ulong_fix_h_