• Building SyncTERM In ArchLinux 64x with CodeBlocks

    From Electrosys@1:103/705 to All on Thu Sep 6 10:54:34 2018
    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?

    Thanks,
    Electrosys

    ---
    ■ Synchronet ■ Digital Aquarium - digiaqua.synchro.net - So much fun...
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Electrosys on Thu Sep 6 10:17:27 2018
    Re: Building SyncTERM In ArchLinux 64x with CodeBlocks
    By: Electrosys to All on Thu Sep 06 2018 10:54 am

    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

    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


    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.

    Like I said earlier, we're not using xp_syslog.c, so you should not be trying to compile it.

    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

    Wow. And why not just "/usr/include"?

    #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?

    No. If you have to modify the source files, you're doing something wrong. These same source files build in a variety of environments (tool-chains/compilers, platforms/architectures) - without modification.

    digital man

    Synchronet/BBS Terminology Definition #26:
    FTSC = FidoNet Technical Standards Committee
    Norco, CA WX: 71.2°F, 77.0% humidity, 2 mph NE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.06-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Electrosys@1:103/705 to Digital Man on Fri Sep 7 16:29:40 2018
    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.

    Electrosys

    ---
    ■ Synchronet ■ Digital Aquarium - digiaqua.synchro.net - So much fun...
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Electrosys on Fri Sep 7 18:59:49 2018
    Re: Building SyncTERM In ArchLinux 64x with CodeBlocks
    By: Electrosys to Digital Man on Fri Sep 07 2018 04:29 pm

    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.

    You should need to modify the code add preprocessor macro definitions - that should be done in your build environment.

    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.

    I agree it's an obvious bug, but since we're not actually using that code, I wouldn't recommend integrating into your build either.

    Would make have a slightly different environment? Is that why I needed to add #include <sys/stat.h> ?

    There are all kinds of variables.

    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.

    Um... then don't use code blocks?

    digital man

    Synchronet/BBS Terminology Definition #33:
    KD = King Drafus (Allen Christiansen)
    Norco, CA WX: 80.0°F, 57.0% humidity, 6 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.06-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)