/camera/camlib

To get this branch, use:
bzr branch http://darksoft.org/webbzr/camera/camlib

« back to all changes in this revision

Viewing changes to include/platform.h

  • Committer: Suren A. Chilingaryan
  • Date: 2011-02-13 01:33:37 UTC
  • Revision ID: csa@dside.dyndns.org-20110213013337-ibm4w4n5a3hu4k7u
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
////////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// - Platform dependent settings plus configuration of exported
 
4
// symbols
 
5
// 
 
6
// (c) 2002, Photonfocus AG, CH-8853 Lachen
 
7
//
 
8
// $Id: platform.h,v 1.13 2008-07-18 13:20:27 hofmann Exp $
 
9
//
 
10
////////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifndef PLATFORM_H_INCLUDED
 
13
#define PLATFORM_H_INCLUDED
 
14
 
 
15
#if defined (WIN32) || defined (__CYGWIN__)
 
16
        #define WIN32_LEAN_AND_MEAN             // Exclude crap
 
17
        #include <windows.h>
 
18
#endif
 
19
 
 
20
#define BYTE unsigned char
 
21
 
 
22
#ifndef NULL
 
23
        #define NULL 0
 
24
#endif
 
25
 
 
26
#if defined (__linux__) || defined (__QNX__)
 
27
        #ifndef HANDLE
 
28
                #define HANDLE int
 
29
        #endif
 
30
        #define DWORD unsigned long
 
31
        #include <unistd.h>
 
32
        #define Sleep usleep
 
33
#endif
 
34
 
 
35
#if defined(SM2_DSP)
 
36
        #ifndef PFHANDLE
 
37
                #define PFHANDLE int
 
38
        #endif
 
39
        #define DWORD unsigned long
 
40
#endif
 
41
 
 
42
#if defined(__QNX__)
 
43
        #include <strings.h>
 
44
#endif
 
45
 
 
46
#if defined(WIN32) && !defined(__CYGWIN__)
 
47
        #define strcasecmp _stricmp
 
48
        #define strncasecmp _strnicmp
 
49
#else
 
50
        #include <string.h>
 
51
#endif
 
52
 
 
53
#ifdef WIN32
 
54
        #define DLLHANDLE  HINSTANCE
 
55
        #define COMMHANDLE HANDLE
 
56
#else 
 
57
        #define DLLHANDLE  void *
 
58
        #define COMMHANDLE int
 
59
        #if defined(SM2_DSP)
 
60
                #define INVALID_HANDLE_VALUE (PFHANDLE) -1
 
61
        #else
 
62
                #define INVALID_HANDLE_VALUE (HANDLE) -1
 
63
        #endif
 
64
#endif
 
65
 
 
66
 
 
67
#endif // PLATFORM_H_INCLUDED