We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Do not use GCC __sync spinlocks if GCC version is less than 4.1. This 
fixes a compilation problem on Ubuntu 6.06 LTS.
Hongli Lai (Phusion (author)
Fri Jul 18 03:22:37 -0700 2008
commit  e3c8a5328a5838e32ffed49d37f5fd411b15b002
tree    9be35a761083fcffad874c636d03aaa15001dbfc
parent  4b4841be737d40dbda9f5750065d576cd8475b69
...
33
34
35
36
 
 
 
 
 
 
 
 
 
 
37
38
39
...
33
34
35
 
36
37
38
39
40
41
42
43
44
45
46
47
48
0
@@ -33,7 +33,16 @@
0
   #define OXT_NO_PTHREAD_SPINLOCKS
0
 #endif
0
 
0
-#if ((__GNUC__ >= 4) && defined(__i386__)) || defined(IN_DOXYGEN)
0
+#ifndef GCC_VERSION
0
+ #define GCC_VERSION (__GNUC__ * 10000 \
0
+ + __GNUC_MINOR__ * 100 \
0
+ + __GNUC_PATCH_LEVEL__)
0
+#endif
0
+
0
+#if (GCC_VERSION > 40100 && defined(__i386__)) || defined(IN_DOXYGEN)
0
+ // GCC 4.0 doesn't support __sync instructions while GCC 4.2
0
+ // does. I'm not sure whether support for it started in 4.1 or
0
+ // 4.2, so the above version check may have to be changed later.
0
   #include "detail/spin_lock_gcc_x86.hpp"
0
 #elif !defined(WIN32) && !defined(OXT_NO_PTHREAD_SPINLOCKS)
0
   #include "detail/spin_lock_pthreads.hpp"

Comments

    No one has commented yet.