File tree 3 files changed +24
-9
lines changed
3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 2.3)
2
2
3
- # if(CMAKE_COMPILER_IS_GNUCXX)
4
- # set( CMAKE_CXX_FLAGS "/GLOBAL_FLAGS_GO_HERE")
5
- # set( CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O2")
6
- # set( CMAKE_CXX_FLAGS_RELEASE "-Wall -O2")
7
- # endif()
8
- set (CMAKE_CXX_FLAGS_DEBUG "-Wall -g -m32" )
3
+ if (CMAKE_COMPILER_IS_GNUCXX)
4
+ set ( CMAKE_CXX_FLAGS "/GLOBAL_FLAGS_GO_HERE" )
5
+ set ( CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O2" )
6
+ set ( CMAKE_CXX_FLAGS_RELEASE "-Wall -O2" )
7
+ endif ()
8
+ # set(CMAKE_CXX_FLAGS "-Wall -g -m32")
9
9
10
10
PROJECT (pbms)
11
11
OPTION (SERVERSTORE_RAM "Build using ServerStoreRAM" ON )
Original file line number Diff line number Diff line change 7
7
* NOTE: These type defines are 32bit/64bit x86 arch biased.
8
8
*/
9
9
10
+ /*
10
11
typedef signed char S8;
11
12
typedef signed short S16;
12
13
typedef signed int S32;
@@ -16,6 +17,19 @@ typedef unsigned char U8;
16
17
typedef unsigned short U16;
17
18
typedef unsigned int U32;
18
19
typedef unsigned long long U64;
20
+ */
21
+
22
+ #include <stdint.h>
23
+
24
+ typedef int8_t S8 ;
25
+ typedef int16_t S16 ;
26
+ typedef int32_t S32 ;
27
+ typedef int64_t S64 ;
28
+
29
+ typedef uint8_t U8 ;
30
+ typedef uint16_t U16 ;
31
+ typedef uint32_t U32 ;
32
+ typedef uint64_t U64 ;
19
33
20
34
typedef float F32 ;
21
35
typedef double F64 ;
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ using namespace std;
34
34
35
35
#if !defined(WIN32) && defined(__GNUC__)
36
36
#include < signal.h>
37
- // #include <sys/types.h>
37
+ #include < sys/types.h>
38
+ #include < unistd.h>
38
39
#define stricmp strcasecmp
39
40
#define strnicmp strncasecmp
40
41
#endif
@@ -191,7 +192,7 @@ char* strnextfield(char *str, size_t *clen)
191
192
192
193
// update previous field's length to caller
193
194
if (clen)
194
- *clen = (U32 )p - (U32 )str;
195
+ *clen = (U64 )p - (U64 )str;
195
196
196
197
// find the field after whitespaces
197
198
num = strspn (p, whitespaces);
@@ -765,7 +766,7 @@ void MasterdCore::CreatePrefs(void)
765
766
}
766
767
767
768
// figure out string length before newline
768
- len = ((U32 )str2 - (U32 )str);
769
+ len = ((U64 )str2 - (U64 )str);
769
770
770
771
// write out string just before newline
771
772
fout << CONFIG_LINE_COMMENT;
You can’t perform that action at this time.
0 commit comments