• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*****************************************************************************/
2 // Copyright 2006 Adobe Systems Incorporated
3 // All Rights Reserved.
4 //
5 // NOTICE:  Adobe permits you to use, modify, and distribute this file in
6 // accordance with the terms of the Adobe license agreement accompanying it.
7 /*****************************************************************************/
8 
9 /* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_types.h#1 $ */
10 /* $DateTime: 2012/05/30 13:28:51 $ */
11 /* $Change: 832332 $ */
12 /* $Author: tknoll $ */
13 
14 /*****************************************************************************/
15 
16 #ifndef __dng_types__
17 #define __dng_types__
18 
19 /*****************************************************************************/
20 
21 #include "dng_flags.h"
22 
23 /*****************************************************************************/
24 
25 // Standard integer types.
26 
27 #ifdef _MSC_VER
28 #include <stddef.h>
29 #endif
30 
31 #include <stdint.h>
32 
33 /*****************************************************************************/
34 
35 #if qDNGUseCustomIntegralTypes
36 
37 #include "dng_custom_integral_types.h"
38 
39 #elif qDNGUseStdInt || 1
40 
41 typedef int8_t  int8;
42 typedef int16_t int16;
43 typedef int32_t int32;
44 typedef int64_t int64;
45 
46 typedef uint8_t  uint8;
47 typedef uint16_t uint16;
48 typedef uint32_t uint32;
49 typedef uint64_t uint64;
50 
51 #else
52 
53 typedef signed char		 int8;
54 typedef signed short	 int16;
55 #if __LP64__
56 typedef signed int		 int32;
57 #else
58 typedef signed long		 int32;
59 #endif
60 typedef signed long long int64;
61 
62 typedef unsigned char      uint8;
63 typedef unsigned short	   uint16;
64 /*Some Mac OS X 10.5 SDK headers already define uint32.*/
65 #ifndef _UINT32
66 #if __LP64__
67 typedef unsigned int	   uint32;
68 #else
69 typedef unsigned long	   uint32;
70 #endif
71 #define _UINT32
72 #endif
73 typedef unsigned long long uint64;
74 
75 #endif
76 
77 typedef uintptr_t uintptr;
78 
79 /*****************************************************************************/
80 
81 typedef float  real32;
82 typedef double real64;
83 
84 /*****************************************************************************/
85 
86 /// \def Build a Macintosh style four-character constant in a compiler safe way.
87 
88 #define DNG_CHAR4(a,b,c,d)	((((uint32) a) << 24) |\
89 							 (((uint32) b) << 16) |\
90 							 (((uint32) c) <<  8) |\
91 							 (((uint32) d)      ))
92 
93 /*****************************************************************************/
94 
95 #include <stdio.h>
96 #include <stdlib.h>
97 #include <string.h>
98 #include <math.h>
99 #include <time.h>
100 
101 /*****************************************************************************/
102 
103 // Visual Studio now prefers _hypot to hypot
104 // Note: since Visual Studio 2010, there is a definition of hypot (in math.h),
105 // we only define hypot here for the older Visual Studio versions.
106 
107 #if defined(_MSC_VER) && _MSC_VER < 1600
108 
109 #ifdef hypot
110 #undef hypot
111 #endif
112 
113 #define hypot _hypot
114 
115 #endif
116 
117 /*****************************************************************************/
118 
119 #endif
120 
121 /*****************************************************************************/
122