2008-04-25 18:18:48 +09:00
|
|
|
/**************************************************************************
|
|
|
|
|
*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* Copyright 2008 VMware, Inc.
|
2008-04-25 18:18:48 +09:00
|
|
|
* All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
|
* the following conditions:
|
|
|
|
|
*
|
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
|
* of the Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
|
2008-04-25 18:18:48 +09:00
|
|
|
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
*
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @file
|
|
|
|
|
* Gallium configuration defines.
|
|
|
|
|
*
|
|
|
|
|
* This header file sets several defines based on the compiler, processor
|
|
|
|
|
* architecture, and operating system being used. These defines should be used
|
|
|
|
|
* throughout the code to facilitate porting to new platforms. It is likely that
|
|
|
|
|
* this file is auto-generated by an autoconf-like tool at some point, as some
|
2008-06-02 19:36:53 +09:00
|
|
|
* things cannot be determined by pre-defined environment alone.
|
2008-04-25 18:18:48 +09:00
|
|
|
*
|
2008-05-28 16:12:14 +09:00
|
|
|
* See also:
|
|
|
|
|
* - http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
|
|
|
|
|
* - echo | gcc -dM -E - | sort
|
|
|
|
|
* - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
|
2008-06-02 19:36:53 +09:00
|
|
|
*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* @author José Fonseca <jfonseca@vmware.com>
|
2008-04-25 18:18:48 +09:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef P_CONFIG_H_
|
|
|
|
|
#define P_CONFIG_H_
|
|
|
|
|
|
2011-05-30 20:21:16 +10:00
|
|
|
#include <limits.h>
|
2008-04-25 18:18:48 +09:00
|
|
|
/*
|
|
|
|
|
* Compiler
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUC__)
|
|
|
|
|
#define PIPE_CC_GCC
|
2017-05-22 10:30:16 -06:00
|
|
|
#define PIPE_CC_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
2008-04-25 18:18:48 +09:00
|
|
|
#endif
|
|
|
|
|
|
2008-06-02 19:36:53 +09:00
|
|
|
/*
|
|
|
|
|
* Meaning of _MSC_VER value:
|
2013-09-10 09:20:34 -06:00
|
|
|
* - 1800: Visual Studio 2013
|
|
|
|
|
* - 1700: Visual Studio 2012
|
|
|
|
|
* - 1600: Visual Studio 2010
|
|
|
|
|
* - 1500: Visual Studio 2008
|
2008-06-02 19:36:53 +09:00
|
|
|
* - 1400: Visual C++ 2005
|
|
|
|
|
* - 1310: Visual C++ .NET 2003
|
|
|
|
|
* - 1300: Visual C++ .NET 2002
|
|
|
|
|
*
|
|
|
|
|
* __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC
|
|
|
|
|
* versions.
|
|
|
|
|
*/
|
2008-04-25 18:18:48 +09:00
|
|
|
#if defined(_MSC_VER) || defined(__MSC__)
|
|
|
|
|
#define PIPE_CC_MSVC
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined(__ICL)
|
|
|
|
|
#define PIPE_CC_ICL
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Processor architecture
|
|
|
|
|
*/
|
|
|
|
|
|
2009-03-23 20:17:57 -07:00
|
|
|
#if defined(__i386__) /* gcc */ || defined(_M_IX86) /* msvc */ || defined(_X86_) || defined(__386__) || defined(i386) || defined(__i386) /* Sun cc */
|
2008-04-25 18:18:48 +09:00
|
|
|
#define PIPE_ARCH_X86
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-03-23 20:17:57 -07:00
|
|
|
#if defined(__x86_64__) /* gcc */ || defined(_M_X64) /* msvc */ || defined(_M_AMD64) /* msvc */ || defined(__x86_64) /* Sun cc */
|
2008-04-25 18:18:48 +09:00
|
|
|
#define PIPE_ARCH_X86_64
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-10-07 14:25:09 +09:00
|
|
|
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
|
|
|
#if defined(PIPE_CC_GCC) && !defined(__SSE2__)
|
|
|
|
|
/* #warning SSE2 support requires -msse -msse2 compiler options */
|
|
|
|
|
#else
|
|
|
|
|
#define PIPE_ARCH_SSE
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-11-06 20:34:28 +08:00
|
|
|
#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__) || defined(__PPC64__)
|
2008-04-25 18:18:48 +09:00
|
|
|
#define PIPE_ARCH_PPC
|
2011-07-31 09:21:56 -07:00
|
|
|
#if defined(__ppc64__) || defined(__PPC64__)
|
2008-10-21 14:12:17 -06:00
|
|
|
#define PIPE_ARCH_PPC_64
|
|
|
|
|
#endif
|
2008-04-25 18:18:48 +09:00
|
|
|
#endif
|
|
|
|
|
|
2013-06-05 09:26:29 +01:00
|
|
|
#if defined(__s390x__)
|
|
|
|
|
#define PIPE_ARCH_S390
|
|
|
|
|
#endif
|
|
|
|
|
|
2013-07-15 10:51:15 -04:00
|
|
|
#if defined(__arm__)
|
|
|
|
|
#define PIPE_ARCH_ARM
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-04-16 19:00:55 -07:00
|
|
|
#if defined(__aarch64__) || defined(_M_ARM64)
|
2013-07-15 10:51:15 -04:00
|
|
|
#define PIPE_ARCH_AARCH64
|
|
|
|
|
#endif
|
2008-04-25 18:18:48 +09:00
|
|
|
|
2021-07-19 18:57:56 +08:00
|
|
|
#if defined(__mips64) && defined(__LP64__)
|
|
|
|
|
#define PIPE_ARCH_MIPS64
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if defined(__mips__)
|
|
|
|
|
#define PIPE_ARCH_MIPS
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-07-08 11:26:52 -07:00
|
|
|
/*
|
|
|
|
|
* Endian detection.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-09-05 09:52:10 +10:00
|
|
|
#include "util/u_endian.h"
|
2011-05-09 12:29:47 +02:00
|
|
|
|
2008-04-25 18:18:48 +09:00
|
|
|
/*
|
2010-02-04 14:37:30 +00:00
|
|
|
* Auto-detect the operating system family.
|
2008-04-25 18:18:48 +09:00
|
|
|
*/
|
2019-08-01 14:58:52 +01:00
|
|
|
#include "util/detect_os.h"
|
2008-04-25 18:18:48 +09:00
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_LINUX
|
2008-04-25 18:18:48 +09:00
|
|
|
#define PIPE_OS_LINUX
|
2019-08-01 14:58:52 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if DETECT_OS_UNIX
|
2009-09-29 13:17:36 +01:00
|
|
|
#define PIPE_OS_UNIX
|
2008-04-25 18:18:48 +09:00
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_ANDROID
|
2011-08-05 12:50:12 +09:00
|
|
|
#define PIPE_OS_ANDROID
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_FREEBSD
|
2009-09-30 09:36:18 -07:00
|
|
|
#define PIPE_OS_FREEBSD
|
2019-08-01 14:58:52 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if DETECT_OS_BSD
|
2009-09-30 09:36:18 -07:00
|
|
|
#define PIPE_OS_BSD
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_OPENBSD
|
2009-09-30 09:36:18 -07:00
|
|
|
#define PIPE_OS_OPENBSD
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_NETBSD
|
2009-09-30 09:36:18 -07:00
|
|
|
#define PIPE_OS_NETBSD
|
2009-02-24 20:51:10 -08:00
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_DRAGONFLY
|
2014-09-16 16:11:53 -07:00
|
|
|
#define PIPE_OS_DRAGONFLY
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_HURD
|
2010-06-23 21:31:28 -04:00
|
|
|
#define PIPE_OS_HURD
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_SOLARIS
|
2009-03-23 20:17:57 -07:00
|
|
|
#define PIPE_OS_SOLARIS
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_APPLE
|
2009-06-25 09:52:50 -06:00
|
|
|
#define PIPE_OS_APPLE
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_WINDOWS
|
2008-04-25 18:18:48 +09:00
|
|
|
#define PIPE_OS_WINDOWS
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_HAIKU
|
2009-09-05 23:06:53 +02:00
|
|
|
#define PIPE_OS_HAIKU
|
|
|
|
|
#endif
|
2008-04-25 18:18:48 +09:00
|
|
|
|
2019-08-01 14:58:52 +01:00
|
|
|
#if DETECT_OS_CYGWIN
|
2010-05-13 01:25:07 -07:00
|
|
|
#define PIPE_OS_CYGWIN
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-04-25 18:18:48 +09:00
|
|
|
#endif /* P_CONFIG_H_ */
|