mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Add native compiler and memory barriers for solaris studio.
Discussion: 20140925133459.GB9633@alap3.anarazel.de Author: Oskari Saarenmaa
This commit is contained in:
parent
db29620d4d
commit
4a54b99e9c
2
configure
vendored
2
configure
vendored
@ -9164,7 +9164,7 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
|
for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||||
|
@ -1016,7 +1016,7 @@ AC_SUBST(UUID_LIBS)
|
|||||||
##
|
##
|
||||||
|
|
||||||
dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
|
dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
|
||||||
AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
|
AC_CHECK_HEADERS([atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h])
|
||||||
|
|
||||||
# On BSD, test for net/if.h will fail unless sys/socket.h
|
# On BSD, test for net/if.h will fail unless sys/socket.h
|
||||||
# is included first.
|
# is included first.
|
||||||
|
@ -340,6 +340,9 @@
|
|||||||
/* Define to 1 if `long long int' works and is 64 bits. */
|
/* Define to 1 if `long long int' works and is 64 bits. */
|
||||||
#undef HAVE_LONG_LONG_INT_64
|
#undef HAVE_LONG_LONG_INT_64
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <mbarrier.h> header file. */
|
||||||
|
#undef HAVE_MBARRIER_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `mbstowcs_l' function. */
|
/* Define to 1 if you have the `mbstowcs_l' function. */
|
||||||
#undef HAVE_MBSTOWCS_L
|
#undef HAVE_MBSTOWCS_L
|
||||||
|
|
||||||
|
@ -19,6 +19,28 @@
|
|||||||
|
|
||||||
#if defined(HAVE_ATOMICS)
|
#if defined(HAVE_ATOMICS)
|
||||||
|
|
||||||
|
#ifdef HAVE_MBARRIER_H
|
||||||
|
#include <mbarrier.h>
|
||||||
|
|
||||||
|
#define pg_compiler_barrier_impl() __compiler_barrier()
|
||||||
|
|
||||||
|
#ifndef pg_memory_barrier_impl
|
||||||
|
# define pg_memory_barrier_impl() __machine_rw_barrier()
|
||||||
|
#endif
|
||||||
|
#ifndef pg_read_barrier_impl
|
||||||
|
/*
|
||||||
|
* Despite the name this is actually a full barrier. Expanding to mfence and
|
||||||
|
* membar #StoreStore | #LoadStore | #StoreLoad | #LoadLoad on x86/sparc
|
||||||
|
* respectively.
|
||||||
|
*/
|
||||||
|
# define pg_read_barrier_impl() __machine_r_barrier()
|
||||||
|
#endif
|
||||||
|
#ifndef pg_write_barrier_impl
|
||||||
|
# define pg_write_barrier_impl() __machine_w_barrier()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HAVE_MBARRIER_H */
|
||||||
|
|
||||||
/* Older versions of the compiler don't have atomic.h... */
|
/* Older versions of the compiler don't have atomic.h... */
|
||||||
#ifdef HAVE_ATOMIC_H
|
#ifdef HAVE_ATOMIC_H
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user