(file) Return to Platform_WIN32_IX86_MSVC.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 martin 1.42 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.43 //
  3 martin 1.42 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.43 //
 10 martin 1.42 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.43 //
 17 martin 1.42 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.43 //
 20 martin 1.42 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.43 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.42 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.43 //
 28 martin 1.42 //////////////////////////////////////////////////////////////////////////
 29 mike   1.9  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32 karl   1.45 /*****************************************************************************
 33               The platform configuration files in pegasus/src/Pegasus/Common/Platform_*.h
 34               are intended to normalize platform/compiler differences so that Pegasus code
 35               can be written to work on all platforms without requiring platform ifdefs.
 36               Since these files are part of the Pegasus SDK, their contents should be
 37               the minimum that achieves the stated purpose.
 38             
 39               Examples of differences that are normalized here are support for C++
 40               namespaces, 64-bit integer type, support for C++ template specialization.
 41             
 42               Examples of things that are not appropriate in these files are the enablement
 43               of Pegasus features for a specific platform and other build configuration.
 44             ******************************************************************************/
 45             
 46 mike   1.9  #ifndef Pegasus_Platform_WIN32_IX86_MSVC_h
 47             #define Pegasus_Platform_WIN32_IX86_MSVC_h
 48             
 49 kumpf  1.13 #define PEGASUS_OS_TYPE_WINDOWS
 50             
 51             #define PEGASUS_EXPORT __declspec(dllexport)
 52             
 53             #define PEGASUS_IMPORT __declspec(dllimport)
 54 mike   1.9  
 55             #define PEGASUS_OS_WIN32
 56             
 57             #define PEGASUS_ARCHITECTURE_IX86
 58             
 59             #define PEGASUS_COMPILER_MSVC
 60             
 61             #define PEGASUS_UINT64 unsigned __int64
 62             
 63             #define PEGASUS_SINT64 __int64
 64 kumpf  1.38 
 65 kumpf  1.14 #define PEGASUS_SINT64_LITERAL(X) Sint64(X)
 66             #define PEGASUS_UINT64_LITERAL(X) Uint64(X)
 67 mday   1.10 
 68 kumpf  1.15 #define PEGASUS_64BIT_CONVERSION_WIDTH "I64"
 69             
 70 mike   1.9  #define PEGASUS_HAVE_NAMESPACES
 71             
 72             // #define PEGASUS_HAVE_FOR_SCOPE
 73             
 74             #define PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
 75             
 76 kumpf  1.13 #define PEGASUS_HAVE_IOS_BINARY
 77 s.hills 1.17 
 78 dl.meetei 1.46 #define PEGASUS_MAXHOSTNAMELEN  256
 79 kumpf     1.19 
 80 mike      1.27 #define PEGASUS_DISABLE_INTERNAL_INLINES
 81                
 82 s.hills   1.17 // Exclude rarely-used stuff from Windows headers
 83 kumpf     1.38 // Note: this is also an easy way to avoid the often introduced
 84 s.hills   1.17 // winsock.h/winsock2.h mixing compiler error problems.
 85 david.dillard 1.20 #ifndef WIN32_LEAN_AND_MEAN
 86 s.hills       1.17 #define WIN32_LEAN_AND_MEAN
 87 david.dillard 1.20 #endif
 88 kumpf         1.13 
 89                    // Suppress this warning: "identifier was truncated to '255' characters in the
 90                    // debug information":
 91                    #pragma warning( disable : 4786 )
 92                    
 93                    // Suppress this warning: "class <XXX> needs to have dll-interface to be used
 94                    // by clients of class <YYY>"
 95                    #pragma warning ( disable : 4251 )
 96                    
 97 tony          1.16 // Supress this warning : non dll-interface class <XXX> used as base
 98                    // for dll-interface class <YYY>
 99                    #pragma warning( disable : 4275 )
100                    
101                    // Supresss this warning : C++ exception specification ignored except
102                    // to indicate a function is not __declspec(nothrow)
103                    #pragma warning( disable : 4290 )
104                    
105 kumpf         1.13 // Suppress this warning : "'this' : used in base member initializer list"
106                    #pragma warning ( disable : 4355 )
107 tony          1.16 
108 kumpf         1.38 // Suppress this warning: 'type' : forcing value to bool 'true' or 'false'
109                    // (performance warning)
110 a.dunfey      1.33 #ifdef PEGASUS_INTERNALONLY
111 kumpf         1.38 #pragma warning( disable : 4800 )
112 mark.hamzy    1.32 #endif
113                    
114 david.dillard 1.35 // VC 8 specific pragmas
115                    #if _MSC_VER >= 1400
116                    // Suppress this warning: '<function>' was declared deprecated
117                    // This warning is supported beginning with VC 8.
118                    #pragma warning ( disable : 4996 )
119                    
120 kumpf         1.38 // Suppress this warning: behavior change: an object of POD type constructed
121                    // with an initializer of the form () will be default-initialized
122 david.dillard 1.35 #pragma warning ( disable : 4345 )
123                    #endif
124                    
125 mike          1.28 //
126                    // Prior to Microsoft Visual Studio 7.0, there were no stream inserters for
127                    // __int64 and unsigned __int64. We declare them if the _MSC_VER is less than
128 kumpf         1.38 // 1300 (subtract 600 to get the version of Visual Studio). Look in
129 mike          1.28 // SystemWindows.cpp for the definitions.
130                    //
131 mike          1.30 #if (_MSC_VER < 1300) && defined(PEGASUS_INTERNALONLY) && defined(__cplusplus)
132 mike          1.28 # include <iostream>
133                    namespace std
134                    {
135 mike          1.29     inline ostream& operator<<(ostream& os, const unsigned __int64& x)
136 mike          1.28     {
137 david.dillard 1.35         char buffer[64];
138                            sprintf(buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u", x);
139                            return os << buffer;
140 mike          1.28     }
141                    
142 mike          1.29     inline ostream& operator<<(ostream& os, const __int64& x)
143 mike          1.28     {
144 david.dillard 1.35         char buffer[64];
145                            sprintf(buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "d", x);
146                            return os << buffer;
147 mike          1.28     }
148                    }
149                    #endif /* _MSC_VER < 1300 */
150 mike          1.9  
151 venkat.puvvada 1.44 #if _MSC_VER > 1400
152                     #define PEGASUS_HAVE_WINDOWS_IPV6ONLY
153                     #endif
154                     
155 mike           1.37 #define PEGASUS_HAVE_WINDOWS_THREADS
156                     
157 marek          1.40 /* use OpenPegasus semaphore based read/write locking mechanism */
158                     #define PEGASUS_USE_SEMAPHORE_RWLOCK
159                     
160 kavita.gupta   1.41 #define PEGASUS_INTEGERS_BOUNDARY_ALIGNED
161                     
162 mike           1.9  #endif /* Pegasus_Platform_WIN32_IX86_MSVC_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2