Browse Source

Bug 615052 - intrinsics and 64-bit atomics code fails to compile
on PA-RISC

https://bugzilla.redhat.com/show_bug.cgi?id=615052

Description by Ulf Weltman ([email protected]):
PA-RISC doesn't have instructions for atomic manipulation of 64-bit integers,
so use pthread mutex to protect this code. That code is already there, we just
need to make sure ATOMIC_64BIT_OPERATIONS is not set for PA-RISC.

Also, pragma INLINE for listing functions that should be inlined is not
supported by PA-RISC's compiler. Using the __inline keyword works with both
PA-RISC and IA64 compilers in ANSI C mode.

Note: configure has been regenerated with autogen.sh script on F-14.

Noriko Hosoi 15 years ago
parent
commit
926d8cc0c0
3 changed files with 3 additions and 8 deletions
  1. 0 3
      configure
  2. 0 1
      configure.ac
  3. 3 4
      ldap/servers/slapd/intrinsics.h

+ 0 - 3
configure

@@ -17175,9 +17175,6 @@ $as_echo "#define _HPUX_SOURCE 1" >>confdefs.h
 
 
 $as_echo "#define _INCLUDE_STDC__SOURCE_199901 1" >>confdefs.h
 $as_echo "#define _INCLUDE_STDC__SOURCE_199901 1" >>confdefs.h
 
 
-
-$as_echo "#define ATOMIC_64BIT_OPERATIONS 1" >>confdefs.h
-
     # assume 64 bit
     # assume 64 bit
     perlexec='/opt/perl_64/bin/perl'
     perlexec='/opt/perl_64/bin/perl'
     platform="hpux"
     platform="hpux"

+ 0 - 1
configure.ac

@@ -407,7 +407,6 @@ case $host in
     AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision])
     AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision])
     AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace])
     AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace])
     AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h])
     AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h])
-    AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
     # assume 64 bit
     # assume 64 bit
     perlexec='/opt/perl_64/bin/perl'
     perlexec='/opt/perl_64/bin/perl'
     platform="hpux"
     platform="hpux"

+ 3 - 4
ldap/servers/slapd/intrinsics.h

@@ -79,10 +79,9 @@ __inline static int tolower_fast(int c)
 
 
 #else
 #else
 
 
-#ifdef HPUX
-#pragma INLINE strcmpi_fast,tolower_fast,toupper_fast,strncasecmp_fast
-#endif
-#ifdef LINUX
+#if defined(HPUX)
+#define INLINE_DIRECTIVE __inline
+#elif defined(LINUX)
 #define INLINE_DIRECTIVE __inline__
 #define INLINE_DIRECTIVE __inline__
 #else
 #else
 #define INLINE_DIRECTIVE
 #define INLINE_DIRECTIVE