Having recently tried to build 7.4, and 8.0 branches on Itanium2 with ICC

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=dugong&dt=2006-09-29%2015:59:09
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=dugong&dt=2006-09-29%2015:59:43

I encountered the same error as people before:
http://archives.postgresql.org/pgsql-hackers/2005-03/msg00084.php
But the patch from this thread wasn't applied.

I don't know whether it's worth fixing that for old branches ... ,
but I send the patches...

Is it worth applying ?

Regards,
        Sergey

*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: [EMAIL PROTECTED]
Index: s_lock.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/storage/s_lock.h,v
retrieving revision 1.133.4.5
diff -c -r1.133.4.5 s_lock.h
*** s_lock.h    29 Aug 2005 00:41:44 -0000      1.133.4.5
--- s_lock.h    3 Oct 2006 10:23:50 -0000
***************
*** 176,181 ****
--- 176,183 ----
  
  #define TAS(lock) tas(lock)
  
+ #ifndef __INTEL_COMPILER
+ 
  static __inline__ int
  tas(volatile slock_t *lock)
  {
***************
*** 189,194 ****
--- 191,209 ----
        return (int) ret;
  }
  
+ #else /* __INTEL_COMPILER */
+ 
+ static __inline__ int
+ tas(volatile slock_t *lock)
+ {
+       int             ret;
+ 
+       ret = _InterlockedExchange(lock,1);     /* this is a xchg asm macro */
+ 
+       return ret;
+ }
+ 
+ #endif /* __INTEL_COMPILER */
  #endif         /* __ia64__ || __ia64 */
  
  
Index: s_lock.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/storage/s_lock.h,v
retrieving revision 1.115.2.1
diff -c -r1.115.2.1 s_lock.h
*** s_lock.h    4 Nov 2003 09:43:56 -0000       1.115.2.1
--- s_lock.h    3 Oct 2006 10:38:28 -0000
***************
*** 117,122 ****
--- 117,124 ----
  #if defined(__ia64__) || defined(__ia64)
  #define TAS(lock) tas(lock)
  
+ #ifndef __INTEL_COMPILER
+ 
  static __inline__ int
  tas(volatile slock_t *lock)
  {
***************
*** 131,136 ****
--- 133,151 ----
        return (int) ret;
  }
  
+ #else /* __INTEL_COMPILER */
+ 
+ static __inline__ int
+ tas(volatile slock_t *lock)
+ {
+       int             ret;
+ 
+       ret = _InterlockedExchange(lock,1);     /* this is a xchg asm macro */
+ 
+       return ret;
+ }
+ 
+ #endif /* __INTEL_COMPILER */
  #endif         /* __ia64__ || __ia64 */
  
  
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to