Home Patches

Working on FreeBSD-CURRENT port

rodrigcrodrigc Member
Hi,

I am working on a FreeBSD-CURRENT port of Ice, because
Ice looks pretty interesting. I've found some problems in the FreeBSD header
files, and am working with the FreeBSD developer's to fix them.

To make your code more portable, you could include
<stdint.h> and define __STDC_LIMIT_MACROS to 1, as allowed by the C99
standard, for compatibility with C++.

I'm not sure if this is the best forum to post patches, but Michi
told me to post it here, so here goes.

Comments

  • marlowamarlowa Member Andrew MarlowOrganization: Wellabove LtdProject: study into feasibility of ice on WINCE project ✭✭
    Re: Working on FreeBSD-CURRENT port
    Originally posted by rodrigc
    Hi,

    To make your code more portable, you could include
    <stdint.h> and define __STDC_LIMIT_MACROS to 1, as allowed by the C99
    standard, for compatibility with C++.


    It's quite ironic that this is NOT portable. I agree that it should be and perhaps sometime in the next ten years it will be, but sadly , some commercial compilers such as Solaris Forte 6.2 do not have this header at the moment.

    Regards,

    Andrew.
  • rodrigcrodrigc Member
    Thanks for the feedback.

    I checked the following boxes which I have access to:

    FreeBSD-CURRENT
    Red Hat Linux 7.3
    MacOS X 10.2.2
    Solaris 2.7

    All of them had <stdint.h> except for Solaris.
    All of them (including Solaris) had <inttypes.h>

    One FreeSBD, MacOS x, and Linux, <inttypes.h> includes <stdint.h>

    So I think this new patch is good.

    I also introduce a macro HAVE_INTTYPES_H, so if
    an autoconf style test is written to detect the presence of this header,
    then it can be used.
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Thanks, we applied the changes to Config.h. They will be available in Ice-1.0.1.
  • rodrigcrodrigc Member
    Hi,

    I have successfully compiled all of ICE on FreeBSD-CURRENT 5.0
    after patching ICE. I am attaching my patches.

    Note: some patches to FreeBSD are required. I am working with the
    FreeBSD developers to integrate these patches.
    FreeBSD patches are:


    http://groups.google.com/groups?oe=UTF-8&selm=fa.e93o6ro.66k01k%40ifi.uio.no

    I am attaching my ICE patches. They are based on feedback from
    Marc and Andrew.

    Now I am going to read the ICE documentation and try it out. :)
  • rodrigcrodrigc Member
    Here is my patch for the Make.rules file for
    Make.rules. It does minor stuff like
    adding -I/usr/local/include to the CPPFLAGS, adding
    -pthread to the compiler flags to get the correct
    stuff linked in for pthreads, and other minor
    fixes for getting the right paths to Xerces, and Berkeley db.

    I don't think it should be integrated in the main source tree,
    but I am posting to show that it can be done without too much
    pain.

    An autoconf kind of system could probably catch all this
    stuff in a generic way, but writing autoconf is a pain. ;)
  • marlowamarlowa Member Andrew MarlowOrganization: Wellabove LtdProject: study into feasibility of ice on WINCE project ✭✭
    Originally posted by rodrigc
    Here is my patch for the Make.rules file for
    Make.rules. It does minor stuff like
    adding -I/usr/local/include to the CPPFLAGS, adding
    -pthread to the compiler flags to get the correct
    stuff linked in for pthreads, and other minor
    fixes for getting the right paths to Xerces, and Berkeley db.

    An autoconf kind of system could probably catch all this
    stuff in a generic way, but writing autoconf is a pain. ;)

    Another patch I found to be necessary was using ncurses instead of curses. This is because Suse 8.1 only has ncurses. It is quite conceivable that ncurses will be installed even on systems that have curses. There are several reasons for this. There is a large termcap database, some open source systems have a heavier dependency on ncurses etc.

    I suggested autoconf a while ago but this does not seem popular. I am currently thinking about another approach that would also allow .dsw files to be generated for a Windoze build using Visual C++.

    Regards,

    Andrew M.
  • rodrigcrodrigc Member
    Some more information about my FreeBSD efforts. I needed the
    following 3rd party packages (known as FreeBSD ports) to get things to
    work with Ice:

    databases/db4 (for Berkeley DB)
    textproc/xerces-c2 (for Xerces C++)
    sysutils/e2fsprogs (for uuid.h)

    If you install those ports, then they pull in the necessary dependent
    ports.

    I should probably write this info up. :)
Sign In or Register to comment.