libcpuid  0.2.2
libcpuid_types.h
1 /*
2  * Copyright 2008 Veselin Georgiev,
3  * anrieffNOSPAM @ mgail_DOT.com (convert to gmail)
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
32 #ifndef __LIBCPUID_TYPES_H__
33 #define __LIBCPUID_TYPES_H__
34 
35 #ifdef HAVE_CONFIG_H
36 # include "config.h"
37 #endif
38 
39 #if defined(HAVE_STDINT_H)
40 # include <stdint.h>
41 #else
42 /* we have to provide our own: */
43 # if !defined(HAVE_INT32_T) && !defined(__int32_t_defined)
44 typedef int int32_t;
45 # endif
46 
47 # if !defined(HAVE_UINT32_T) && !defined(__uint32_t_defined)
48 typedef unsigned uint32_t;
49 # endif
50 
51 typedef signed char int8_t;
52 typedef unsigned char uint8_t;
53 typedef signed short int16_t;
54 typedef unsigned short uint16_t;
55 #if (defined _MSC_VER) && (_MSC_VER <= 1300)
56  /* MSVC 6.0: no long longs ... */
57  typedef signed __int64 int64_t;
58  typedef unsigned __int64 uint64_t;
59 #else
60  /* all other sane compilers: */
61  typedef signed long long int64_t;
62  typedef unsigned long long uint64_t;
63 #endif
64 
65 #endif
66 
67 #endif /* __LIBCPUID_TYPES_H__ */