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 #ifdef KEY /* Bug 3635 */ 00057 /* This must increase to track our increase in MAX_ID_LEN */ 00058 # define NUM_ID_WDS 8 /* words in identifier*/ 00059 #else 00060 # define NUM_ID_WDS 4 /* words in identifier*/ 00061 #endif /* KEY Bug 3635 */ 00062 00063 # elif _HOST32 00064 00065 # define HOST_BITS_PER_WORD 32 /* Bits per word */ 00066 # define HOST_BYTES_PER_WORD 4 /* Bytes per word */ 00067 00068 # define HOST_BYTES_TO_WORDS(BYTE_SIZE) (((BYTE_SIZE)+3) >> 2) 00069 00070 # define MAX_MSG_SIZE 400 00071 #ifdef KEY /* Bug 3635 */ 00072 # define NUM_ID_WDS 16 /* words in identifier*/ 00073 #else 00074 # define NUM_ID_WDS 8 /* words in identifier*/ 00075 #endif /* KEY Bug 3635 */ 00076 # endif 00077 00078 /* From Cray man page. */ 00079 /* The _toupper and _tolower functions accomplish the same thing as */ 00080 /* toupper and tolower, but have a restricted domain and are faster. The */ 00081 /* _toupper function requires a lowercase letter as its argument; its */ 00082 /* result is the corresponding uppercase letter. The _tolower function */ 00083 /* requires an uppercase letter as its argument; its result is the */ 00084 /* corresponding lowercase letter. Arguments outside the domain cause */ 00085 /* undefined results. */ 00086 00087 # if defined(_HOST_OS_UNICOS) || defined(_HOST_OS_MAX) 00088 00089 # define TOUPPER _toupper /* To use macro */ 00090 00091 # else 00092 00093 # define TOUPPER toupper 00094 # endif 00095 00096 # ifndef _MAXVL 00097 # define _MAXVL 64 00098 # endif 00099 00100 /* This is standard C used by fseek. gcc does not support it. */ 00101 00102 # ifndef SEEK_CUR 00103 # define SEEK_CUR 1 00104 # endif 00105 00106 # if defined(_HOST_OS_UNICOS) || defined(_HOST_OS_MAX) 00107 # define Pragma(S) _Pragma(S) 00108 # else 00109 # define Pragma(S) 00110 # endif 00111 00112 # if defined(_HOST_OS_SOLARIS) 00113 # define MAXHOSTNAMELEN 256 00114 # endif 00115 00116
1.5.6