~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to cpp/include/IceUtil/Shared.h

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// **********************************************************************
2
2
//
3
 
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
 
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
4
4
//
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
13
13
#include <IceUtil/Config.h>
14
14
 
15
15
#if defined(ICE_USE_MUTEX_SHARED)
 
16
 
16
17
#   include <IceUtil/Mutex.h>
17
18
 
 
19
// Using the gcc builtins requires gcc 4.1 or better. For Linux, i386
 
20
// doesn't work. Apple is supported for all architectures. Sun only
 
21
// supports sparc (32 and 64 bit).
 
22
 
 
23
#elif __GNUC__ >= 4 && __GNUC_MINOR__ >= 1 && \
 
24
        ((defined(__sun) && (defined(__sparc) || defined(__sparcv9))) || \
 
25
         defined(__APPLE__) || \
 
26
        (defined(__linux) && \
 
27
                (defined(__i486) || defined(__i586) || \
 
28
                 defined(__i686) || defined(__x86_64))))
 
29
 
 
30
#   define ICE_HAS_GCC_BUILTINS
 
31
 
18
32
#elif (defined(__APPLE__) || defined(__linux) || defined(__FreeBSD__)) && (defined(__i386) || defined(__x86_64)) && !defined(__ICC)
 
33
 
19
34
#   define ICE_HAS_ATOMIC_FUNCTIONS
20
35
 
21
36
#elif defined(_WIN32)
119
134
 
120
135
#if defined(_WIN32)
121
136
    LONG _ref;
122
 
#elif defined(ICE_HAS_ATOMIC_FUNCTIONS)
 
137
#elif defined(ICE_HAS_ATOMIC_FUNCTIONS) || defined(ICE_HAS_GCC_BUILTINS)
123
138
    volatile int _ref;
124
139
#else
125
140
    int _ref;