I think I was getting some false positives when I thought I was building all the libs in CodeBlocks successfully.
I'm pretty sure I got XPDEV building in CodeBlocks with just a few tweaks to an include and a define.
I added #include <sys/stat.h> to dirwrap.h
I added #include <sys/stat.h> to filewrap.h
In gendefs.h I switched some of the defines around:
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) #define INTTYPES_H_64BIT_PREFIX "I64"
#else
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
#ifndef BIT_64_STUFF
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define INTTYPES_H_64BIT_PREFIX "I64"
#else
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
typedef uint64_t uintmax_t;
#define _UINTMAX_T_DECLARED
typedef int64_t intmax_t;
#define _INTMAX_T_DECLARED
#endif
Added #include <stdio.h> to xp_syslog.c . I also moved the line for the next declariation down as it was a bug next to the define the way it was.
static SOCKET syslog_sock=INVALID_SOCKET;
static char log_host[1025]=
#ifdef __unix__
"";
#else
"localhost";
#endif
static int log_opts=LOG_CONS;
I also create a code blocks file with:
Search Paths:
../../../../../../usr/include
../../../../../../usr/include/SDL
#Defines
__USE_MISC
HAS_STDINT_H
BIT_64_STUFF
__unix__
The BIT_64_STUFF flag probably needs a better name, but do you think I'm going in the right direction so far?
If you have to modify the code, you're doing it wrong.
In gendefs.h I switched some of the defines around:
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) #define INTTYPES_H_64BIT_PREFIX "I64"
#else
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
#ifndef BIT_64_STUFF
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define INTTYPES_H_64BIT_PREFIX "I64"
#else
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
typedef uint64_t uintmax_t;
#define _UINTMAX_T_DECLARED
typedef int64_t intmax_t;
#define _INTMAX_T_DECLARED
#endif
Re: Building SyncTERM In ArchLinux 64x with CodeBlocks
By: Digital Man to Electrosys on Thu Sep 06 2018 10:17 am
If you have to modify the code, you're doing it wrong.
In gendefs.h I switched some of the defines around:
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) #define INTTYPES_H_64BIT_PREFIX "I64"
#else
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
#ifndef BIT_64_STUFF
#if defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#define INTTYPES_H_64BIT_PREFIX "I64"
#else
typedef signed long long int int64_t;
typedef unsigned long long int uint64_t;
#define INTTYPES_H_64BIT_PREFIX "ll"
#endif
typedef uint64_t uintmax_t;
#define _UINTMAX_T_DECLARED
typedef int64_t intmax_t;
#define _INTMAX_T_DECLARED
#endif
With the define here I was getting an error around a type already being defined. I noticed there was a define in another section for that case, but not in this section.
For syslog, I just fixed a bug and it built. Theres a pretty obvious bug there where that define was added to default the value.
Would make have a slightly different environment? Is that why I needed to add #include <sys/stat.h> ?
I didn't really make any code changes perse, just to the defines. I'm not really seeing another way to build it in code blocks.
Sysop: | Kurt Hamm |
---|---|
Location: | Columbia, SC |
Users: | 7 |
Nodes: | 20 (0 / 20) |
Uptime: | 232:38:59 |
Calls: | 2,774 |
Calls today: | 2 |
Files: | 64 |
Messages: | 848,240 |