00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2.1 of the GNU Lesser General Public License 00007 as published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU Lesser General Public 00021 License along with this program; if not, write the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 00023 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 00037 00038 /* $Header: /proj/osprey/CVS/open64/osprey1.0/libI77/backward.c,v 1.1.1.1 2005/10/21 19:00:00 marcel Exp $ */ 00039 /* 3.0 SID # 1.3 */ 00040 /* who ref. date description */ 00041 /* sjc #1677 25Nov87 Provide dummy f77vms_flag_ for backward */ 00042 /* compatibility with pre-1.21 main.o files*/ 00043 00044 /* 00045 We provide a common f77vms_flag_ so that a main.o file compiled prior to 00046 1.30 will not get link errors with a 1.30 library. Here's the checkered 00047 history of this flag: 00048 00049 MIPS1.21: 00050 f77vms_flag (no trailing underscore) 00051 main.o exports it as large/small init data 00052 libI77.a imports it as small undefined (often fails if main.o exported 00053 it as large undefined) 00054 00055 MIPS1.30-and-later, SGI1.21-and-later: 00056 f77vms_flag_ 00057 main.o exports it as large/small init data 00058 libI77.a imports it as undefined 00059 00060 Compatibility matrix: 00061 00062 libI77.a 00063 -------- 00064 main.o 1.10 MIPS1.21 SGI1.21 1.30 00065 ------ ---- -------- ------- ---- 00066 1.10 ok undef backup.o backup.o 00067 MIPS1.21 novms ok novms novms 00068 SGI1.21 novms novms ok ok 00069 1.30 novms novms ok ok 00070 00071 ok: Works as expected 00072 novms: Links, but ignores any -vms specified when main.o compiled. 00073 undef: Link gets "undefined" error. 00074 backup.o: Works as expected, due to this file. 00075 00076 */ 00077 00078 /* 00079 * This makes a small common symbol which will satisfy libI77's desire to 00080 * import one. The linker will ignore this if main.o exported one, and 00081 * thus no large/small conflicts occur if main.o was compiled with -G 0. 00082 * 00083 * See how much trouble one little flag can cause? 00084 */ 00085 00086 #define VMS_FLAGS 4 00087 #include "vmsflags.h" 00088 unsigned short f77vms_flag_[VMS_FLAGS]; 00089 00090 void 00091 __set_f77vms_flag_( flag_arr ) 00092 unsigned short flag_arr[VMS_FLAGS]; 00093 { 00094 int i; 00095 for (i=0; i<VMS_FLAGS; i++) 00096 f77vms_flag_[i] = flag_arr[i]; 00097 }
1.5.6