Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
host.m
Go to the documentation of this file.
00001 
00002 /*
00003 
00004   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00005 
00006   This program is free software; you can redistribute it and/or modify it
00007   under the terms of version 2 of the GNU General Public License as
00008   published by the Free Software Foundation.
00009 
00010   This program is distributed in the hope that it would be useful, but
00011   WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00013 
00014   Further, this software is distributed without any warranty that it is
00015   free of the rightful claim of any third person regarding infringement 
00016   or the like.  Any license provided herein, whether implied or 
00017   otherwise, applies only to this software file.  Patent licenses, if 
00018   any, provided herein do not apply to combinations of this program with 
00019   other software, or any other product whatsoever.  
00020 
00021   You should have received a copy of the GNU General Public License along
00022   with this program; if not, write the Free Software Foundation, Inc., 59
00023   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00024 
00025   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00026   Mountain View, CA 94043, or:
00027 
00028   http://www.sgi.com
00029 
00030   For further information regarding this notice, see:
00031 
00032   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00033 
00034 */
00035 
00036 /* USMID:  "\n@(#)5.0_pl/macros/host.m  5.1     04/29/99 21:22:31\n" */
00037 
00038 /* This module is for host specific information.  */
00039 
00040 /*   CHAR_BIT  is defined in limits.h and is the number of bits in a char.    */
00041 /*   _WORD_BIT is defined in limits.h and is the number of bits per word.     */
00042 
00043 
00044 # ifdef _HOST64
00045 
00046 # ifndef _HOST_OS_UNICOS 
00047 #    define _WORD_BIT                           64
00048 # endif
00049 
00050 #    define HOST_BITS_PER_WORD                  _WORD_BIT    /* Bits per word */
00051 #    define HOST_BYTES_PER_WORD                 8       /* Bytes per word     */
00052 
00053 #    define HOST_BYTES_TO_WORDS(BYTE_SIZE)      (((BYTE_SIZE)+7) >> 3)
00054 
00055 #    define MAX_MSG_SIZE                        200
00056 #    define NUM_ID_WDS                          4       /* words in identifier*/
00057 
00058 # elif _HOST32
00059 
00060 #    define HOST_BITS_PER_WORD                  32      /* Bits per word   */
00061 #    define HOST_BYTES_PER_WORD                 4       /* Bytes per word  */
00062 
00063 #    define HOST_BYTES_TO_WORDS(BYTE_SIZE)      (((BYTE_SIZE)+3) >> 2)
00064 
00065 #    define MAX_MSG_SIZE                        400
00066 #    define NUM_ID_WDS                          8       /* words in identifier*/
00067 # endif
00068 
00069 /* From Cray man page.                                                       */
00070 /*   The _toupper and _tolower functions accomplish the same thing as        */
00071 /*   toupper and tolower, but have a restricted domain and are faster.  The  */
00072 /*   _toupper function requires a lowercase letter as its argument; its      */
00073 /*   result is the corresponding uppercase letter.  The _tolower function    */
00074 /*   requires an uppercase letter as its argument; its result is the         */
00075 /*   corresponding lowercase letter.  Arguments outside the domain cause     */
00076 /*   undefined results.                                                      */
00077 
00078 # if defined(_HOST_OS_UNICOS) || defined(_HOST_OS_MAX)
00079 
00080 #    define TOUPPER                     _toupper        /* To use macro       */
00081 
00082 # else
00083 
00084 #    define TOUPPER                     toupper
00085 # endif
00086 
00087 # ifndef _MAXVL
00088 # define _MAXVL 64
00089 # endif
00090 
00091 /* This is standard C used by fseek.  gcc does not support it. */
00092 
00093 # ifndef SEEK_CUR
00094 # define SEEK_CUR 1
00095 # endif
00096 
00097 # if defined(_HOST_OS_UNICOS) || defined(_HOST_OS_MAX)
00098 # define Pragma(S)      _Pragma(S)
00099 # else
00100 # define Pragma(S)
00101 # endif
00102 
00103 /*# if defined(_HOST_OS_SOLARIS)  */
00104 # ifndef _HOST_OS_LINUX 
00105 #   define      MAXHOSTNAMELEN  256
00106 # endif 
00107 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines