• Advertisement
Sign in to follow this  

FreeBSD Fix

This topic is 3224 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Currently FreeBSD support is broken because it has no configuration for atomic functions. The same method for Linux works with it:
// Free BSD

#elif __FreeBSD__

    #define AS_BSD

    #if defined(i386) && !defined(__LP64__)

        #define AS_X86

    #else

        #define AS_MAX_PORTABILITY

    #endif

    #define AS_POSIX_THREADS

    #if !( ( (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1) || __GNUC__ > 4) )

        // Only with GCC 4.1 was the atomic instructions available

        #define AS_NO_ATOMIC

    #endif


Then in as_atomic.cpp:
#elif defined(AS_LINUX) || defined(AS_BSD)


I've tested it using PC-BSD which is based on FreeBSD 7.2-pre -Jeremy

Share this post


Link to post
Share on other sites
Advertisement
Also when I get some free time I still plan to test my program on other BSD based operating systems. When I do I'll post any required changes to add support.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement