1*6236dae4SAndroid Build Coastguard Worker$! File: config_h.com 2*6236dae4SAndroid Build Coastguard Worker$! 3*6236dae4SAndroid Build Coastguard Worker$! This procedure attempts to figure out how to build a config.h file 4*6236dae4SAndroid Build Coastguard Worker$! for the current project. 5*6236dae4SAndroid Build Coastguard Worker$! 6*6236dae4SAndroid Build Coastguard Worker$! P1 specifies the config.h.in file or equivalent. If it is not specified 7*6236dae4SAndroid Build Coastguard Worker$! then this procedure will search for several common names of the file. 8*6236dae4SAndroid Build Coastguard Worker$! 9*6236dae4SAndroid Build Coastguard Worker$! The CONFIGURE shell script will be examined for hints and a few symbols 10*6236dae4SAndroid Build Coastguard Worker$! but most of the tests will not produce valid results on OpenVMS. Some 11*6236dae4SAndroid Build Coastguard Worker$! will produce false positives and some will produce false negatives. 12*6236dae4SAndroid Build Coastguard Worker$! 13*6236dae4SAndroid Build Coastguard Worker$! It is easier to just read the config.h_in file and make up tests based 14*6236dae4SAndroid Build Coastguard Worker$! on what is in it! 15*6236dae4SAndroid Build Coastguard Worker$! 16*6236dae4SAndroid Build Coastguard Worker$! This file will create an empty config_vms.h file if one does not exist. 17*6236dae4SAndroid Build Coastguard Worker$! The config_vms.h is intended for manual edits to handle things that 18*6236dae4SAndroid Build Coastguard Worker$! this procedure can not. 19*6236dae4SAndroid Build Coastguard Worker$! 20*6236dae4SAndroid Build Coastguard Worker$! The config_vms.h will be invoked by the resulting config.h file. 21*6236dae4SAndroid Build Coastguard Worker$! 22*6236dae4SAndroid Build Coastguard Worker$! This procedure knows about the DEC C RTL on the system it is on. 23*6236dae4SAndroid Build Coastguard Worker$! Future versions may be handle the GNV, the OpenVMS porting library, 24*6236dae4SAndroid Build Coastguard Worker$! and others. 25*6236dae4SAndroid Build Coastguard Worker$! 26*6236dae4SAndroid Build Coastguard Worker$! This procedure may not guess the options correctly for all architectures, 27*6236dae4SAndroid Build Coastguard Worker$! and is a work in progress. 28*6236dae4SAndroid Build Coastguard Worker$! 29*6236dae4SAndroid Build Coastguard Worker$! Copyright (C) John Malmberg 30*6236dae4SAndroid Build Coastguard Worker$! 31*6236dae4SAndroid Build Coastguard Worker$! Permission to use, copy, modify, and/or distribute this software for any 32*6236dae4SAndroid Build Coastguard Worker$! purpose with or without fee is hereby granted, provided that the above 33*6236dae4SAndroid Build Coastguard Worker$! copyright notice and this permission notice appear in all copies. 34*6236dae4SAndroid Build Coastguard Worker$! 35*6236dae4SAndroid Build Coastguard Worker$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 36*6236dae4SAndroid Build Coastguard Worker$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 37*6236dae4SAndroid Build Coastguard Worker$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 38*6236dae4SAndroid Build Coastguard Worker$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 39*6236dae4SAndroid Build Coastguard Worker$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 40*6236dae4SAndroid Build Coastguard Worker$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 41*6236dae4SAndroid Build Coastguard Worker$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 42*6236dae4SAndroid Build Coastguard Worker$! 43*6236dae4SAndroid Build Coastguard Worker$! SPDX-License-Identifier: ISC 44*6236dae4SAndroid Build Coastguard Worker$! 45*6236dae4SAndroid Build Coastguard Worker$!============================================================================ 46*6236dae4SAndroid Build Coastguard Worker$! 47*6236dae4SAndroid Build Coastguard Worker$ss_normal = 1 48*6236dae4SAndroid Build Coastguard Worker$ss_abort = 44 49*6236dae4SAndroid Build Coastguard Worker$ss_control_y = 1556 50*6236dae4SAndroid Build Coastguard Worker$status = ss_normal 51*6236dae4SAndroid Build Coastguard Worker$on control_y then goto control_y 52*6236dae4SAndroid Build Coastguard Worker$on warning then goto general_error 53*6236dae4SAndroid Build Coastguard Worker$!on warning then set ver 54*6236dae4SAndroid Build Coastguard Worker$! 55*6236dae4SAndroid Build Coastguard Worker$! Some information for writing timestamps to created files 56*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------- 57*6236dae4SAndroid Build Coastguard Worker$my_proc = f$environment("PROCEDURE") 58*6236dae4SAndroid Build Coastguard Worker$my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE") 59*6236dae4SAndroid Build Coastguard Worker$tab[0,8] = 9 60*6236dae4SAndroid Build Coastguard Worker$datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME")) 61*6236dae4SAndroid Build Coastguard Worker$username = f$edit(f$getjpi("","USERNAME"),"TRIM") 62*6236dae4SAndroid Build Coastguard Worker$! 63*6236dae4SAndroid Build Coastguard Worker$pid = f$getjpi("","PID") 64*6236dae4SAndroid Build Coastguard Worker$tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP" 65*6236dae4SAndroid Build Coastguard Worker$dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP" 66*6236dae4SAndroid Build Coastguard Worker$starhfile = "SYS$SCRATCH:config_h_starlet_''pid'.TEMP" 67*6236dae4SAndroid Build Coastguard Worker$configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP" 68*6236dae4SAndroid Build Coastguard Worker$! 69*6236dae4SAndroid Build Coastguard Worker$! Get the system type 70*6236dae4SAndroid Build Coastguard Worker$!---------------------- 71*6236dae4SAndroid Build Coastguard Worker$arch_type = f$getsyi("arch_type") 72*6236dae4SAndroid Build Coastguard Worker$! 73*6236dae4SAndroid Build Coastguard Worker$! Does config_vms.h exist? 74*6236dae4SAndroid Build Coastguard Worker$!------------------------- 75*6236dae4SAndroid Build Coastguard Worker$update_config_vms = 0 76*6236dae4SAndroid Build Coastguard Worker$file = f$search("sys$disk:[]config_vms.h") 77*6236dae4SAndroid Build Coastguard Worker$if file .nes. "" 78*6236dae4SAndroid Build Coastguard Worker$then 79*6236dae4SAndroid Build Coastguard Worker$ write sys$output "Found existing custom file ''file'." 80*6236dae4SAndroid Build Coastguard Worker$else 81*6236dae4SAndroid Build Coastguard Worker$ update_config_vms = 1 82*6236dae4SAndroid Build Coastguard Worker$ write sys$output "Creating new sys$disk:[]config_vms.h for you." 83*6236dae4SAndroid Build Coastguard Worker$ gosub write_config_vms 84*6236dae4SAndroid Build Coastguard Worker$endif 85*6236dae4SAndroid Build Coastguard Worker$! 86*6236dae4SAndroid Build Coastguard Worker$! 87*6236dae4SAndroid Build Coastguard Worker$! On some platforms, DCL search has problems with searching a file 88*6236dae4SAndroid Build Coastguard Worker$! on a NFS mounted volume. So copy it to sys$scratch: 89*6236dae4SAndroid Build Coastguard Worker$! 90*6236dae4SAndroid Build Coastguard Worker$if f$search(configure_script) .nes. "" then delete 'configure_script';* 91*6236dae4SAndroid Build Coastguard Worker$copy sys$disk:[]configure 'configure_script' 92*6236dae4SAndroid Build Coastguard Worker$! 93*6236dae4SAndroid Build Coastguard Worker$ssl_header_dir = "OPENSSL:" 94*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("OPENSSL") .eqs. "" 95*6236dae4SAndroid Build Coastguard Worker$then 96*6236dae4SAndroid Build Coastguard Worker$ ssl_header_dir = "SSL$INCLUDE:" 97*6236dae4SAndroid Build Coastguard Worker$endif 98*6236dae4SAndroid Build Coastguard Worker$! 99*6236dae4SAndroid Build Coastguard Worker$! 100*6236dae4SAndroid Build Coastguard Worker$! Write out the header 101*6236dae4SAndroid Build Coastguard Worker$!---------------------- 102*6236dae4SAndroid Build Coastguard Worker$gosub write_config_h_header 103*6236dae4SAndroid Build Coastguard Worker$! 104*6236dae4SAndroid Build Coastguard Worker$! 105*6236dae4SAndroid Build Coastguard Worker$! 106*6236dae4SAndroid Build Coastguard Worker$! config.h.in could have at least five different names depending 107*6236dae4SAndroid Build Coastguard Worker$! on how it was transferred to OpenVMS 108*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------------------ 109*6236dae4SAndroid Build Coastguard Worker$if p1 .nes. "" 110*6236dae4SAndroid Build Coastguard Worker$then 111*6236dae4SAndroid Build Coastguard Worker$ cfile = p1 112*6236dae4SAndroid Build Coastguard Worker$else 113*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("sys$disk:[]config.h.in") 114*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 115*6236dae4SAndroid Build Coastguard Worker$ then 116*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("sys$disk:[]config.h_in") 117*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 118*6236dae4SAndroid Build Coastguard Worker$ then 119*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("sys$disk:[]configh.in") 120*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 121*6236dae4SAndroid Build Coastguard Worker$ then 122*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("sys$disk:[]config__2eh.in") 123*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 124*6236dae4SAndroid Build Coastguard Worker$ then 125*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("sys$disk:[]config.h__2ein") 126*6236dae4SAndroid Build Coastguard Worker$ endif 127*6236dae4SAndroid Build Coastguard Worker$ endif 128*6236dae4SAndroid Build Coastguard Worker$ endif 129*6236dae4SAndroid Build Coastguard Worker$ endif 130*6236dae4SAndroid Build Coastguard Worker$endif 131*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("PRJ_INCLUDE") .nes. "" 132*6236dae4SAndroid Build Coastguard Worker$then 133*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("PRJ_INCLUDE:config.h.in") 134*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 135*6236dae4SAndroid Build Coastguard Worker$ then 136*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("PRJ_INCLUDE:config.h_in") 137*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 138*6236dae4SAndroid Build Coastguard Worker$ then 139*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("PRJ_INCLUDE:config__2eh.in") 140*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 141*6236dae4SAndroid Build Coastguard Worker$ then 142*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("PRJ_INCLUDE:config__2eh.in") 143*6236dae4SAndroid Build Coastguard Worker$ if cfile .eqs. "" 144*6236dae4SAndroid Build Coastguard Worker$ then 145*6236dae4SAndroid Build Coastguard Worker$ cfile = f$search("PRJ_INCLUDE:config.h__2ein") 146*6236dae4SAndroid Build Coastguard Worker$ endif 147*6236dae4SAndroid Build Coastguard Worker$ endif 148*6236dae4SAndroid Build Coastguard Worker$ endif 149*6236dae4SAndroid Build Coastguard Worker$ endif 150*6236dae4SAndroid Build Coastguard Worker$endif 151*6236dae4SAndroid Build Coastguard Worker$if cfile .eqs. "" 152*6236dae4SAndroid Build Coastguard Worker$then 153*6236dae4SAndroid Build Coastguard Worker$ write sys$output "Can not find sys$disk:config.h.in" 154*6236dae4SAndroid Build Coastguard Worker$ line_out = "Looked for config.h.in, config.h_in, configh.in, " 155*6236dae4SAndroid Build Coastguard Worker$ line_out = line_out + "config__2eh.in, config.h__2ein" 156*6236dae4SAndroid Build Coastguard Worker$ write/symbol sys$output line_out 157*6236dae4SAndroid Build Coastguard Worker$ if f$trnlnm("PRJ_INCLUDE") .nes. "" 158*6236dae4SAndroid Build Coastguard Worker$ then 159*6236dae4SAndroid Build Coastguard Worker$ write sys$output "Also looked in PRJ_INCLUDE: for these files." 160*6236dae4SAndroid Build Coastguard Worker$ endif 161*6236dae4SAndroid Build Coastguard Worker$! 162*6236dae4SAndroid Build Coastguard Worker$ write tf "" 163*6236dae4SAndroid Build Coastguard Worker$ write tf - 164*6236dae4SAndroid Build Coastguard Worker " /* Could not find sys$disk:config.h.in */" 165*6236dae4SAndroid Build Coastguard Worker$ write tf - 166*6236dae4SAndroid Build Coastguard Worker " /* Looked also for config.h_in, configh.in, config__2eh.in, */" 167*6236dae4SAndroid Build Coastguard Worker$ write tf - 168*6236dae4SAndroid Build Coastguard Worker " /* config.h__2ein */" 169*6236dae4SAndroid Build Coastguard Worker$ if f$trnlnm("PRJ_INCLUDE") .nes. "" 170*6236dae4SAndroid Build Coastguard Worker$ then 171*6236dae4SAndroid Build Coastguard Worker$ write tf - 172*6236dae4SAndroid Build Coastguard Worker " /* Also looked in PRJ_INCLUDE: for these files. */" 173*6236dae4SAndroid Build Coastguard Worker$ endif 174*6236dae4SAndroid Build Coastguard Worker$ write tf - 175*6236dae4SAndroid Build Coastguard Worker "/*--------------------------------------------------------------*/ 176*6236dae4SAndroid Build Coastguard Worker$ write tf "" 177*6236dae4SAndroid Build Coastguard Worker$ goto write_tail 178*6236dae4SAndroid Build Coastguard Worker$endif 179*6236dae4SAndroid Build Coastguard Worker$! 180*6236dae4SAndroid Build Coastguard Worker$! 181*6236dae4SAndroid Build Coastguard Worker$! Locate the DECC libraries in use 182*6236dae4SAndroid Build Coastguard Worker$!----------------------------------- 183*6236dae4SAndroid Build Coastguard Worker$decc_rtldef = f$parse("decc$rtldef","sys$library:.tlb;0") 184*6236dae4SAndroid Build Coastguard Worker$decc_starletdef = f$parse("sys$starlet_c","sys$library:.tlb;0") 185*6236dae4SAndroid Build Coastguard Worker$decc_shr = f$parse("decc$shr","sys$share:.exe;0") 186*6236dae4SAndroid Build Coastguard Worker$! 187*6236dae4SAndroid Build Coastguard Worker$! Dump the DECC header names into a file 188*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------- 189*6236dae4SAndroid Build Coastguard Worker$if f$search(dchfile) .nes. "" then delete 'dchfile';* 190*6236dae4SAndroid Build Coastguard Worker$if f$search(tfile1) .nes. "" then delete 'tfile1';* 191*6236dae4SAndroid Build Coastguard Worker$define/user sys$output 'tfile1' 192*6236dae4SAndroid Build Coastguard Worker$library/list 'decc_rtldef' 193*6236dae4SAndroid Build Coastguard Worker$open/read/error=rtldef_loop1_end tf1 'tfile1' 194*6236dae4SAndroid Build Coastguard Worker$open/write/error=rtldef_loop1_end tf2 'dchfile' 195*6236dae4SAndroid Build Coastguard Worker$rtldef_loop1: 196*6236dae4SAndroid Build Coastguard Worker$ read/end=rtldef_loop1_end tf1 line_in 197*6236dae4SAndroid Build Coastguard Worker$ line_in = f$edit(line_in,"TRIM,COMPRESS") 198*6236dae4SAndroid Build Coastguard Worker$ key1 = f$element(0," ",line_in) 199*6236dae4SAndroid Build Coastguard Worker$ key2 = f$element(1," ",line_in) 200*6236dae4SAndroid Build Coastguard Worker$ if key1 .eqs. " " .or. key1 .eqs. "" then goto rtldef_loop1 201*6236dae4SAndroid Build Coastguard Worker$ if key2 .nes. " " .and. key2 .nes. "" then goto rtldef_loop1 202*6236dae4SAndroid Build Coastguard Worker$ write tf2 "|",key1,"|" 203*6236dae4SAndroid Build Coastguard Worker$ goto rtldef_loop1 204*6236dae4SAndroid Build Coastguard Worker$rtldef_loop1_end: 205*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 206*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 207*6236dae4SAndroid Build Coastguard Worker$if f$search(tfile1) .nes. "" then delete 'tfile1';* 208*6236dae4SAndroid Build Coastguard Worker$! 209*6236dae4SAndroid Build Coastguard Worker$! Dump the STARLET header names into a file 210*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------- 211*6236dae4SAndroid Build Coastguard Worker$if f$search(starhfile) .nes. "" then delete 'starhfile';* 212*6236dae4SAndroid Build Coastguard Worker$if f$search(tfile1) .nes. "" then delete 'tfile1';* 213*6236dae4SAndroid Build Coastguard Worker$define/user sys$output 'tfile1' 214*6236dae4SAndroid Build Coastguard Worker$library/list 'decc_starletdef' 215*6236dae4SAndroid Build Coastguard Worker$open/read/error=stardef_loop1_end tf1 'tfile1' 216*6236dae4SAndroid Build Coastguard Worker$open/write/error=stardef_loop1_end tf2 'starhfile' 217*6236dae4SAndroid Build Coastguard Worker$stardef_loop1: 218*6236dae4SAndroid Build Coastguard Worker$ read/end=stardef_loop1_end tf1 line_in 219*6236dae4SAndroid Build Coastguard Worker$ line_in = f$edit(line_in,"TRIM,COMPRESS") 220*6236dae4SAndroid Build Coastguard Worker$ key1 = f$element(0," ",line_in) 221*6236dae4SAndroid Build Coastguard Worker$ key2 = f$element(1," ",line_in) 222*6236dae4SAndroid Build Coastguard Worker$ if key1 .eqs. " " .or. key1 .eqs. "" then goto stardef_loop1 223*6236dae4SAndroid Build Coastguard Worker$ if key2 .nes. " " .and. key2 .nes. "" then goto stardef_loop1 224*6236dae4SAndroid Build Coastguard Worker$ write tf2 "|",key1,"|" 225*6236dae4SAndroid Build Coastguard Worker$ goto stardef_loop1 226*6236dae4SAndroid Build Coastguard Worker$stardef_loop1_end: 227*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 228*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 229*6236dae4SAndroid Build Coastguard Worker$if f$search(tfile1) .nes. "" then delete 'tfile1';* 230*6236dae4SAndroid Build Coastguard Worker$! 231*6236dae4SAndroid Build Coastguard Worker$! 232*6236dae4SAndroid Build Coastguard Worker$! Now calculate what should be in the file from reading 233*6236dae4SAndroid Build Coastguard Worker$! config.h.in and CONFIGURE. 234*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------------------------- 235*6236dae4SAndroid Build Coastguard Worker$open/read inf 'cfile' 236*6236dae4SAndroid Build Coastguard Worker$do_comment = 0 237*6236dae4SAndroid Build Coastguard Worker$if_block = 0 238*6236dae4SAndroid Build Coastguard Worker$cfgh_in_loop1: 239*6236dae4SAndroid Build Coastguard Worker$!set nover 240*6236dae4SAndroid Build Coastguard Worker$ read/end=cfgh_in_loop1_end inf line_in 241*6236dae4SAndroid Build Coastguard Worker$ xline = f$edit(line_in,"TRIM,COMPRESS") 242*6236dae4SAndroid Build Coastguard Worker$! 243*6236dae4SAndroid Build Coastguard Worker$! Blank line handling 244*6236dae4SAndroid Build Coastguard Worker$!--------------------- 245*6236dae4SAndroid Build Coastguard Worker$ if xline .eqs. "" 246*6236dae4SAndroid Build Coastguard Worker$ then 247*6236dae4SAndroid Build Coastguard Worker$ write tf "" 248*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 249*6236dae4SAndroid Build Coastguard Worker$ endif 250*6236dae4SAndroid Build Coastguard Worker$ xlen = f$length(xline) 251*6236dae4SAndroid Build Coastguard Worker$ key = f$extract(0,2,xline) 252*6236dae4SAndroid Build Coastguard Worker$! 253*6236dae4SAndroid Build Coastguard Worker$! deal with comments by copying exactly 254*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------- 255*6236dae4SAndroid Build Coastguard Worker$ if (do_comment .eq. 1) .or. (key .eqs. "/*") 256*6236dae4SAndroid Build Coastguard Worker$ then 257*6236dae4SAndroid Build Coastguard Worker$ do_comment = 1 258*6236dae4SAndroid Build Coastguard Worker$ write tf line_in 259*6236dae4SAndroid Build Coastguard Worker$ key = f$extract(xlen - 2, 2, xline) 260*6236dae4SAndroid Build Coastguard Worker$ if key .eqs. "*/" then do_comment = 0 261*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 262*6236dae4SAndroid Build Coastguard Worker$ endif 263*6236dae4SAndroid Build Coastguard Worker$! 264*6236dae4SAndroid Build Coastguard Worker$! Some quick parsing 265*6236dae4SAndroid Build Coastguard Worker$!---------------------- 266*6236dae4SAndroid Build Coastguard Worker$ keyif = f$extract(0,3,xline) 267*6236dae4SAndroid Build Coastguard Worker$ key1 = f$element(0," ",xline) 268*6236dae4SAndroid Build Coastguard Worker$ key2 = f$element(1," ",xline) 269*6236dae4SAndroid Build Coastguard Worker$ key2a = f$element(0,"_",key2) 270*6236dae4SAndroid Build Coastguard Worker$ key2b = f$element(1,"_",key2) 271*6236dae4SAndroid Build Coastguard Worker$ key2_len = f$length(key2) 272*6236dae4SAndroid Build Coastguard Worker$ key2_h = f$extract(key2_len - 2, 2, key2) 273*6236dae4SAndroid Build Coastguard Worker$ key2_t = f$extract(key2_len - 5, 5, key2) 274*6236dae4SAndroid Build Coastguard Worker$ if key2_t .eqs. "_TYPE" then key2_h = "_T" 275*6236dae4SAndroid Build Coastguard Worker$ key64 = 0 276*6236dae4SAndroid Build Coastguard Worker$ if f$locate("64", xline) .lt. xlen then key64 = 1 277*6236dae4SAndroid Build Coastguard Worker$! 278*6236dae4SAndroid Build Coastguard Worker$!write sys$output "xline = ''xline'" 279*6236dae4SAndroid Build Coastguard Worker$! 280*6236dae4SAndroid Build Coastguard Worker$! Comment out this section of the ifblock 281*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------- 282*6236dae4SAndroid Build Coastguard Worker$ if if_block .ge. 3 283*6236dae4SAndroid Build Coastguard Worker$ then 284*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 285*6236dae4SAndroid Build Coastguard Worker$ if keyif .eqs. "#en" then if_block = 0 286*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 287*6236dae4SAndroid Build Coastguard Worker$ endif 288*6236dae4SAndroid Build Coastguard Worker$! 289*6236dae4SAndroid Build Coastguard Worker$! Handle the end of an ifblock 290*6236dae4SAndroid Build Coastguard Worker$!------------------------------- 291*6236dae4SAndroid Build Coastguard Worker$ if keyif .eqs. "#en" 292*6236dae4SAndroid Build Coastguard Worker$ then 293*6236dae4SAndroid Build Coastguard Worker$ write tf xline 294*6236dae4SAndroid Build Coastguard Worker$ if_block = 0 295*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 296*6236dae4SAndroid Build Coastguard Worker$ endif 297*6236dae4SAndroid Build Coastguard Worker$! 298*6236dae4SAndroid Build Coastguard Worker$ if key1 .eqs. "#ifndef" 299*6236dae4SAndroid Build Coastguard Worker$ then 300*6236dae4SAndroid Build Coastguard Worker$! Manual check for _ALL_SOURCE on AIX error 301*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 302*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "_ALL_SOURCE" 303*6236dae4SAndroid Build Coastguard Worker$ then 304*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 305*6236dae4SAndroid Build Coastguard Worker$! 306*6236dae4SAndroid Build Coastguard Worker$! Ignore the rest of the block 307*6236dae4SAndroid Build Coastguard Worker$!-------------------------------------- 308*6236dae4SAndroid Build Coastguard Worker$ if_block = 3 309*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 310*6236dae4SAndroid Build Coastguard Worker$ endif 311*6236dae4SAndroid Build Coastguard Worker$ endif 312*6236dae4SAndroid Build Coastguard Worker$! 313*6236dae4SAndroid Build Coastguard Worker$! 314*6236dae4SAndroid Build Coastguard Worker$! Default action for an #if/#else/#endif 315*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------ 316*6236dae4SAndroid Build Coastguard Worker$ if keyif .eqs. "#if" .or. keyif .eqs. "#el" 317*6236dae4SAndroid Build Coastguard Worker$ then 318*6236dae4SAndroid Build Coastguard Worker$ if_block = 1 319*6236dae4SAndroid Build Coastguard Worker$ write tf xline 320*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 321*6236dae4SAndroid Build Coastguard Worker$ endif 322*6236dae4SAndroid Build Coastguard Worker$! 323*6236dae4SAndroid Build Coastguard Worker$! 324*6236dae4SAndroid Build Coastguard Worker$! Process "normal?" stuff 325*6236dae4SAndroid Build Coastguard Worker$!--------------------------- 326*6236dae4SAndroid Build Coastguard Worker$ if key1 .eqs. "#undef" 327*6236dae4SAndroid Build Coastguard Worker$ then 328*6236dae4SAndroid Build Coastguard Worker$ key2c = f$element(2, "_", key2) 329*6236dae4SAndroid Build Coastguard Worker$ if (key2c .eqs. "_") .or. (key2c .eqs. "H") then key2c = "" 330*6236dae4SAndroid Build Coastguard Worker$ key2d = f$element(3, "_", key2) 331*6236dae4SAndroid Build Coastguard Worker$ if (key2d .eqs. "_") .or. (key2d .eqs. "H") then key2d = "" 332*6236dae4SAndroid Build Coastguard Worker$ key2e = f$element(4, "_", key2) 333*6236dae4SAndroid Build Coastguard Worker$ if (key2e .eqs. "_") .or. (key2e .eqs. "H") then key2e = "" 334*6236dae4SAndroid Build Coastguard Worker$ if key2d .eqs. "T" 335*6236dae4SAndroid Build Coastguard Worker$ then 336*6236dae4SAndroid Build Coastguard Worker$ if key2e .eqs. "TYPE" 337*6236dae4SAndroid Build Coastguard Worker$ then 338*6236dae4SAndroid Build Coastguard Worker$ key2_h = "_T" 339*6236dae4SAndroid Build Coastguard Worker$ key2d = "" 340*6236dae4SAndroid Build Coastguard Worker$ endif 341*6236dae4SAndroid Build Coastguard Worker$ endif 342*6236dae4SAndroid Build Coastguard Worker$! 343*6236dae4SAndroid Build Coastguard Worker$ double_under = 0 344*6236dae4SAndroid Build Coastguard Worker$! 345*6236dae4SAndroid Build Coastguard Worker$! Process FCNTL directives 346*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 347*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "FCNTL") .and. (key2c .eqs. "O") .and. - 348*6236dae4SAndroid Build Coastguard Worker (key2d .eqs. "NONBLOCK") 349*6236dae4SAndroid Build Coastguard Worker$ then 350*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 351*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 352*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 353*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 354*6236dae4SAndroid Build Coastguard Worker$ endif 355*6236dae4SAndroid Build Coastguard Worker$! 356*6236dae4SAndroid Build Coastguard Worker$! Process GETADDRINFO directives 357*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 358*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETADDRINFO_THREADSAFE" 359*6236dae4SAndroid Build Coastguard Worker$ then 360*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 361*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 362*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 363*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 364*6236dae4SAndroid Build Coastguard Worker$ endif 365*6236dae4SAndroid Build Coastguard Worker$! 366*6236dae4SAndroid Build Coastguard Worker$! Process IOCTL directives 367*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 368*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "IOCTL") .and. (key2c .nes. "") 369*6236dae4SAndroid Build Coastguard Worker$ then 370*6236dae4SAndroid Build Coastguard Worker$ if (key2c .eqs. "FIONBIO") .or. (key2c .eqs. "SIOCGIFADDR") 371*6236dae4SAndroid Build Coastguard Worker$ then 372*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 373*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 374*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 375*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 376*6236dae4SAndroid Build Coastguard Worker$ endif 377*6236dae4SAndroid Build Coastguard Worker$ endif 378*6236dae4SAndroid Build Coastguard Worker$! 379*6236dae4SAndroid Build Coastguard Worker$! 380*6236dae4SAndroid Build Coastguard Worker$! Manual check for LL on 381*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 382*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "LL" 383*6236dae4SAndroid Build Coastguard Worker$ then 384*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX 385*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_''key2' 1" 386*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 387*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 388*6236dae4SAndroid Build Coastguard Worker$ endif 389*6236dae4SAndroid Build Coastguard Worker$! 390*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "bool_t" 391*6236dae4SAndroid Build Coastguard Worker$ then 392*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 393*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' short" 394*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 395*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 396*6236dae4SAndroid Build Coastguard Worker$ endif 397*6236dae4SAndroid Build Coastguard Worker$! 398*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "bits16_t" 399*6236dae4SAndroid Build Coastguard Worker$ then 400*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 401*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' short" 402*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 403*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 404*6236dae4SAndroid Build Coastguard Worker$ endif 405*6236dae4SAndroid Build Coastguard Worker$! 406*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "u_bits16_t" 407*6236dae4SAndroid Build Coastguard Worker$ then 408*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 409*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' unsigned short" 410*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 411*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 412*6236dae4SAndroid Build Coastguard Worker$ endif 413*6236dae4SAndroid Build Coastguard Worker$! 414*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "bits32_t" 415*6236dae4SAndroid Build Coastguard Worker$ then 416*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 417*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 418*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 419*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 420*6236dae4SAndroid Build Coastguard Worker$ endif 421*6236dae4SAndroid Build Coastguard Worker$! 422*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "u_bits32_t" 423*6236dae4SAndroid Build Coastguard Worker$ then 424*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 425*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' unsigned int" 426*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 427*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 428*6236dae4SAndroid Build Coastguard Worker$ endif 429*6236dae4SAndroid Build Coastguard Worker$! 430*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "intmax_t" 431*6236dae4SAndroid Build Coastguard Worker$ then 432*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 433*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifdef __VAX" 434*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' long" 435*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 436*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' long long" 437*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 438*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 439*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 440*6236dae4SAndroid Build Coastguard Worker$ endif 441*6236dae4SAndroid Build Coastguard Worker$! 442*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "uintmax_t" 443*6236dae4SAndroid Build Coastguard Worker$ then 444*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 445*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifdef __VAX" 446*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' unsigned long" 447*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 448*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' unsigned long long" 449*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 450*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 451*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 452*6236dae4SAndroid Build Coastguard Worker$ endif 453*6236dae4SAndroid Build Coastguard Worker$! 454*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "socklen_t" 455*6236dae4SAndroid Build Coastguard Worker$ then 456*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 457*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 458*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 459*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 460*6236dae4SAndroid Build Coastguard Worker$ endif 461*6236dae4SAndroid Build Coastguard Worker$! 462*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETGROUPS_T" 463*6236dae4SAndroid Build Coastguard Worker$ then 464*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 465*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' gid_t" 466*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 467*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 468*6236dae4SAndroid Build Coastguard Worker$ endif 469*6236dae4SAndroid Build Coastguard Worker$! 470*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_SYS_SIGLIST" 471*6236dae4SAndroid Build Coastguard Worker$ then 472*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 473*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 474*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 475*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 476*6236dae4SAndroid Build Coastguard Worker$ endif 477*6236dae4SAndroid Build Coastguard Worker$! 478*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_SYS_ERRLIST" 479*6236dae4SAndroid Build Coastguard Worker$ then 480*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 481*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 482*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 483*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 484*6236dae4SAndroid Build Coastguard Worker$ endif 485*6236dae4SAndroid Build Coastguard Worker$! 486*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_STRUCT_DIRENT_D_INO" 487*6236dae4SAndroid Build Coastguard Worker$ then 488*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 489*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 490*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 491*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 492*6236dae4SAndroid Build Coastguard Worker$ endif 493*6236dae4SAndroid Build Coastguard Worker$! 494*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_STRUCT_TIMEVAL" 495*6236dae4SAndroid Build Coastguard Worker$ then 496*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 497*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 498*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 499*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 500*6236dae4SAndroid Build Coastguard Worker$ endif 501*6236dae4SAndroid Build Coastguard Worker$! 502*6236dae4SAndroid Build Coastguard Worker$! ! The header files have this information, however 503*6236dae4SAndroid Build Coastguard Worker$! ! The ioctl() call only works on sockets. 504*6236dae4SAndroid Build Coastguard Worker$! if key2 .eqs. "FIONREAD_IN_SYS_IOCTL" 505*6236dae4SAndroid Build Coastguard Worker$! then 506*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 507*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ''key2' 1" 508*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 509*6236dae4SAndroid Build Coastguard Worker$! goto cfgh_in_loop1 510*6236dae4SAndroid Build Coastguard Worker$! endif 511*6236dae4SAndroid Build Coastguard Worker$! 512*6236dae4SAndroid Build Coastguard Worker$! ! The header files have this information, however 513*6236dae4SAndroid Build Coastguard Worker$! ! The ioctl() call only works on sockets. 514*6236dae4SAndroid Build Coastguard Worker$! if key2 .eqs. "GWINSZ_IN_SYS_IOCTL" 515*6236dae4SAndroid Build Coastguard Worker$! then 516*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 517*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ''key2' 1" 518*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 519*6236dae4SAndroid Build Coastguard Worker$! goto cfgh_in_loop1 520*6236dae4SAndroid Build Coastguard Worker$! endif 521*6236dae4SAndroid Build Coastguard Worker$! 522*6236dae4SAndroid Build Coastguard Worker$! ! The header files have this information, however 523*6236dae4SAndroid Build Coastguard Worker$! ! The ioctl() call only works on sockets. 524*6236dae4SAndroid Build Coastguard Worker$! if key2 .eqs. "STRUCT_WINSIZE_IN_SYS_IOCTL" 525*6236dae4SAndroid Build Coastguard Worker$! then 526*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 527*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ''key2' 0" 528*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 529*6236dae4SAndroid Build Coastguard Worker$! goto cfgh_in_loop1 530*6236dae4SAndroid Build Coastguard Worker$! endif 531*6236dae4SAndroid Build Coastguard Worker$! 532*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_STRUCT_TM_TM_ZONE" 533*6236dae4SAndroid Build Coastguard Worker$ then 534*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 535*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 536*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 537*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 538*6236dae4SAndroid Build Coastguard Worker$ endif 539*6236dae4SAndroid Build Coastguard Worker$! 540*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_TM_ZONE" 541*6236dae4SAndroid Build Coastguard Worker$ then 542*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 543*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 544*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 545*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 546*6236dae4SAndroid Build Coastguard Worker$ endif 547*6236dae4SAndroid Build Coastguard Worker$! 548*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_TIMEVAL" 549*6236dae4SAndroid Build Coastguard Worker$ then 550*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 551*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 552*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 553*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 554*6236dae4SAndroid Build Coastguard Worker$ endif 555*6236dae4SAndroid Build Coastguard Worker$! 556*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "WEXITSTATUS_OFFSET" 557*6236dae4SAndroid Build Coastguard Worker$ then 558*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 559*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 2" 560*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 561*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 562*6236dae4SAndroid Build Coastguard Worker$ endif 563*6236dae4SAndroid Build Coastguard Worker$! 564*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_GETPW_DECLS" 565*6236dae4SAndroid Build Coastguard Worker$ then 566*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 567*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 568*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 569*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 570*6236dae4SAndroid Build Coastguard Worker$ endif 571*6236dae4SAndroid Build Coastguard Worker$! 572*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_CONFSTR" 573*6236dae4SAndroid Build Coastguard Worker$ then 574*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 575*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 576*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 577*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 578*6236dae4SAndroid Build Coastguard Worker$ endif 579*6236dae4SAndroid Build Coastguard Worker$! 580*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_PRINTF" 581*6236dae4SAndroid Build Coastguard Worker$ then 582*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 583*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 584*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 585*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 586*6236dae4SAndroid Build Coastguard Worker$ endif 587*6236dae4SAndroid Build Coastguard Worker$! 588*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_SBRK" 589*6236dae4SAndroid Build Coastguard Worker$ then 590*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 591*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 592*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 593*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 594*6236dae4SAndroid Build Coastguard Worker$ endif 595*6236dae4SAndroid Build Coastguard Worker$! 596*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRSIGNAL" 597*6236dae4SAndroid Build Coastguard Worker$ then 598*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 599*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 600*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 601*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 602*6236dae4SAndroid Build Coastguard Worker$ endif 603*6236dae4SAndroid Build Coastguard Worker$! 604*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "HAVE_DECL_STRTOLD" 605*6236dae4SAndroid Build Coastguard Worker$ then 606*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 607*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 608*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 609*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 610*6236dae4SAndroid Build Coastguard Worker$ endif 611*6236dae4SAndroid Build Coastguard Worker$! 612*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOIMAX" 613*6236dae4SAndroid Build Coastguard Worker$ then 614*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 615*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 616*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 617*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 618*6236dae4SAndroid Build Coastguard Worker$ endif 619*6236dae4SAndroid Build Coastguard Worker$! 620*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOL" 621*6236dae4SAndroid Build Coastguard Worker$ then 622*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 623*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 624*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 625*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 626*6236dae4SAndroid Build Coastguard Worker$ endif 627*6236dae4SAndroid Build Coastguard Worker$! 628*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOLL" 629*6236dae4SAndroid Build Coastguard Worker$ then 630*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 631*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 632*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 633*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 634*6236dae4SAndroid Build Coastguard Worker$ endif 635*6236dae4SAndroid Build Coastguard Worker$! 636*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOUL" 637*6236dae4SAndroid Build Coastguard Worker$ then 638*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 639*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 640*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 641*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 642*6236dae4SAndroid Build Coastguard Worker$ endif 643*6236dae4SAndroid Build Coastguard Worker$! 644*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOULL" 645*6236dae4SAndroid Build Coastguard Worker$ then 646*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 647*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 648*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 649*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 650*6236dae4SAndroid Build Coastguard Worker$ endif 651*6236dae4SAndroid Build Coastguard Worker$! 652*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_STRTOUMAX" 653*6236dae4SAndroid Build Coastguard Worker$ then 654*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 655*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 656*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 657*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 658*6236dae4SAndroid Build Coastguard Worker$ endif 659*6236dae4SAndroid Build Coastguard Worker$! 660*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETPGRP_VOID" 661*6236dae4SAndroid Build Coastguard Worker$ then 662*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 663*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 664*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 665*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 666*6236dae4SAndroid Build Coastguard Worker$ endif 667*6236dae4SAndroid Build Coastguard Worker$! 668*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "NAMED_PIPES_MISSING" 669*6236dae4SAndroid Build Coastguard Worker$ then 670*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 671*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 672*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 673*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 674*6236dae4SAndroid Build Coastguard Worker$ endif 675*6236dae4SAndroid Build Coastguard Worker$! 676*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "OPENDIR_NOT_ROBUST" 677*6236dae4SAndroid Build Coastguard Worker$ then 678*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 679*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 680*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 681*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 682*6236dae4SAndroid Build Coastguard Worker$ endif 683*6236dae4SAndroid Build Coastguard Worker$! 684*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "PGRP_PIPE" 685*6236dae4SAndroid Build Coastguard Worker$ then 686*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 687*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 688*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 689*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 690*6236dae4SAndroid Build Coastguard Worker$ endif 691*6236dae4SAndroid Build Coastguard Worker$! 692*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "CAN_REDEFINE_GETENV" 693*6236dae4SAndroid Build Coastguard Worker$ then 694*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 695*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 696*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 697*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 698*6236dae4SAndroid Build Coastguard Worker$ endif 699*6236dae4SAndroid Build Coastguard Worker$! 700*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_PRINTF_A_FORMAT" 701*6236dae4SAndroid Build Coastguard Worker$ then 702*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 703*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 704*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 705*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 706*6236dae4SAndroid Build Coastguard Worker$ endif 707*6236dae4SAndroid Build Coastguard Worker$! 708*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "CTYPE_NON_ASCII" 709*6236dae4SAndroid Build Coastguard Worker$ then 710*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 711*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 712*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 713*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 714*6236dae4SAndroid Build Coastguard Worker$ endif 715*6236dae4SAndroid Build Coastguard Worker$! 716*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_LANGINFO_CODESET" 717*6236dae4SAndroid Build Coastguard Worker$ then 718*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 719*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 0" 720*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 721*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 722*6236dae4SAndroid Build Coastguard Worker$ endif 723*6236dae4SAndroid Build Coastguard Worker$! 724*6236dae4SAndroid Build Coastguard Worker$! This wants execve() to do this automagically to pass. 725*6236dae4SAndroid Build Coastguard Worker$! if key2 .eqs. "HAVE_HASH_BANG_EXEC" 726*6236dae4SAndroid Build Coastguard Worker$! then 727*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 728*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ''key2' 1" 729*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 730*6236dae4SAndroid Build Coastguard Worker$! goto cfgh_in_loop1 731*6236dae4SAndroid Build Coastguard Worker$! endif 732*6236dae4SAndroid Build Coastguard Worker$! 733*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "ICONV_CONST" 734*6236dae4SAndroid Build Coastguard Worker$ then 735*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 736*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2'" 737*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 738*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 739*6236dae4SAndroid Build Coastguard Worker$ endif 740*6236dae4SAndroid Build Coastguard Worker$! 741*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "VOID_SIGHANDLER" 742*6236dae4SAndroid Build Coastguard Worker$ then 743*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 744*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 745*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 746*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 747*6236dae4SAndroid Build Coastguard Worker$ endif 748*6236dae4SAndroid Build Coastguard Worker$! 749*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_POSIX_SIGNALS" 750*6236dae4SAndroid Build Coastguard Worker$ then 751*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 752*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 753*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 754*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 755*6236dae4SAndroid Build Coastguard Worker$ endif 756*6236dae4SAndroid Build Coastguard Worker$! 757*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "UNUSABLE_RT_SIGNALS" 758*6236dae4SAndroid Build Coastguard Worker$ then 759*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 760*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 761*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 762*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 763*6236dae4SAndroid Build Coastguard Worker$ endif 764*6236dae4SAndroid Build Coastguard Worker$! 765*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "HAVE_DECL_FPURGE" 766*6236dae4SAndroid Build Coastguard Worker$ then 767*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2a'" 768*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2a' 1" 769*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 770*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 771*6236dae4SAndroid Build Coastguard Worker$ endif 772*6236dae4SAndroid Build Coastguard Worker$! 773*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_DECL_SETREGID" 774*6236dae4SAndroid Build Coastguard Worker$ then 775*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 776*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 777*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 778*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 779*6236dae4SAndroid Build Coastguard Worker$ endif 780*6236dae4SAndroid Build Coastguard Worker$! 781*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "HAVE_POSIX_SIGSETJMP" 782*6236dae4SAndroid Build Coastguard Worker$ then 783*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 784*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 785*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 786*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 787*6236dae4SAndroid Build Coastguard Worker$ endif 788*6236dae4SAndroid Build Coastguard Worker$! 789*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. "" 790*6236dae4SAndroid Build Coastguard Worker$ then 791*6236dae4SAndroid Build Coastguard Worker$ if (key2c .eqs. "EGD") .or. - 792*6236dae4SAndroid Build Coastguard Worker (key2c .eqs. "STATUS") .or. - 793*6236dae4SAndroid Build Coastguard Worker (key2c .eqs. "SCREEN") 794*6236dae4SAndroid Build Coastguard Worker$ then 795*6236dae4SAndroid Build Coastguard Worker$ if f$search("''ssl_header_dir'rand.h") .nes. "" 796*6236dae4SAndroid Build Coastguard Worker$ then 797*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 798*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 799*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 800*6236dae4SAndroid Build Coastguard Worker$ else 801*6236dae4SAndroid Build Coastguard Worker$ write tf "/* #undef ''key2' */" 802*6236dae4SAndroid Build Coastguard Worker$ endif 803*6236dae4SAndroid Build Coastguard Worker$ endif 804*6236dae4SAndroid Build Coastguard Worker$ endif 805*6236dae4SAndroid Build Coastguard Worker$! 806*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "STRCOLL_BROKEN" 807*6236dae4SAndroid Build Coastguard Worker$ then 808*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 809*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 810*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 811*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 812*6236dae4SAndroid Build Coastguard Worker$ endif 813*6236dae4SAndroid Build Coastguard Worker$! 814*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "DUP_BROKEN" 815*6236dae4SAndroid Build Coastguard Worker$ then 816*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 817*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 818*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 819*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 820*6236dae4SAndroid Build Coastguard Worker$ endif 821*6236dae4SAndroid Build Coastguard Worker$! 822*6236dae4SAndroid Build Coastguard Worker$! This is for a test that getcwd(0,0) works. 823*6236dae4SAndroid Build Coastguard Worker$! It does not on VMS. 824*6236dae4SAndroid Build Coastguard Worker$!-------------------------- 825*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETCWD_BROKEN" 826*6236dae4SAndroid Build Coastguard Worker$ then 827*6236dae4SAndroid Build Coastguard Worker$ write sys$output "" 828*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 829*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being tested for!" 830*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 831*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-GETCWD, GETCWD(0,0) does not work on VMS." 832*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 833*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-GETCWD2, Work around hack probably required." 834*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 835*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 836*6236dae4SAndroid Build Coastguard Worker$ if update_config_vms 837*6236dae4SAndroid Build Coastguard Worker$ then 838*6236dae4SAndroid Build Coastguard Worker$ open/append tfcv sys$disk:[]config_vms.h 839*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 840*6236dae4SAndroid Build Coastguard Worker$ write tfcv - 841*6236dae4SAndroid Build Coastguard Worker "/* Check config.h for use of ''key2' settings */" 842*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 843*6236dae4SAndroid Build Coastguard Worker$ close tfcv 844*6236dae4SAndroid Build Coastguard Worker$ endif 845*6236dae4SAndroid Build Coastguard Worker$ 846*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 847*6236dae4SAndroid Build Coastguard Worker$ endif 848*6236dae4SAndroid Build Coastguard Worker$! 849*6236dae4SAndroid Build Coastguard Worker$ if (key2a .eqs. "HAVE") .or. (key2a .eqs. "STAT") .or. - 850*6236dae4SAndroid Build Coastguard Worker (key2 .eqs. "USE_IPV6") .or. (key2b .eqs. "LDAP") 851*6236dae4SAndroid Build Coastguard Worker$ then 852*6236dae4SAndroid Build Coastguard Worker$! 853*6236dae4SAndroid Build Coastguard Worker$! Process extra underscores 854*6236dae4SAndroid Build Coastguard Worker$!------------------------------------ 855*6236dae4SAndroid Build Coastguard Worker$ if f$locate("HAVE___", key2) .lt. key2_len 856*6236dae4SAndroid Build Coastguard Worker$ then 857*6236dae4SAndroid Build Coastguard Worker$ key2b = "__" + key2d 858*6236dae4SAndroid Build Coastguard Worker$ key2d = "" 859*6236dae4SAndroid Build Coastguard Worker$ double_under = 1 860*6236dae4SAndroid Build Coastguard Worker$ else 861*6236dae4SAndroid Build Coastguard Worker$ if f$locate("HAVE__", key2) .lt. key2_len 862*6236dae4SAndroid Build Coastguard Worker$ then 863*6236dae4SAndroid Build Coastguard Worker$ key2b = "_" + key2c 864*6236dae4SAndroid Build Coastguard Worker$ key2c = "" 865*6236dae4SAndroid Build Coastguard Worker$ double_under = 1 866*6236dae4SAndroid Build Coastguard Worker$ endif 867*6236dae4SAndroid Build Coastguard Worker$ endif 868*6236dae4SAndroid Build Coastguard Worker$! 869*6236dae4SAndroid Build Coastguard Worker$ if (key2_h .eqs. "_H") .or. (key2 .eqs. "USE_IPV6") .or. - 870*6236dae4SAndroid Build Coastguard Worker (key2b .eqs. "LDAP") 871*6236dae4SAndroid Build Coastguard Worker$ then 872*6236dae4SAndroid Build Coastguard Worker$! 873*6236dae4SAndroid Build Coastguard Worker$! Looking for a header file 874*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------- 875*6236dae4SAndroid Build Coastguard Worker$ headf = key2b 876*6236dae4SAndroid Build Coastguard Worker$ if key2c .nes. "" then headf = headf + "_" + key2c 877*6236dae4SAndroid Build Coastguard Worker$ if key2d .nes. "" then headf = headf + "_" + key2d 878*6236dae4SAndroid Build Coastguard Worker$! 879*6236dae4SAndroid Build Coastguard Worker$! (key2b .eqs. "READLINE") 880*6236dae4SAndroid Build Coastguard Worker$! 881*6236dae4SAndroid Build Coastguard Worker$! Some special parsing 882*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------ 883*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "SYS") .or. (key2b .eqs. "ARPA") .or. - 884*6236dae4SAndroid Build Coastguard Worker (key2b .eqs. "NET") .or. (key2b .eqs. "NETINET") 885*6236dae4SAndroid Build Coastguard Worker$ then 886*6236dae4SAndroid Build Coastguard Worker$ if key2c .nes. "" 887*6236dae4SAndroid Build Coastguard Worker$ then 888*6236dae4SAndroid Build Coastguard Worker$ headf = key2c 889*6236dae4SAndroid Build Coastguard Worker$ if key2d .nes. "" then headf = key2c + "_" + key2d 890*6236dae4SAndroid Build Coastguard Worker$ endif 891*6236dae4SAndroid Build Coastguard Worker$ endif 892*6236dae4SAndroid Build Coastguard Worker$! 893*6236dae4SAndroid Build Coastguard Worker$! And of course what's life with out some special cases 894*6236dae4SAndroid Build Coastguard Worker$!-------------------------------------------------------------------- 895*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "USE_IPV6" 896*6236dae4SAndroid Build Coastguard Worker$ then 897*6236dae4SAndroid Build Coastguard Worker$ headf = "in6" 898*6236dae4SAndroid Build Coastguard Worker$ endif 899*6236dae4SAndroid Build Coastguard Worker$! 900*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "LDAP" 901*6236dae4SAndroid Build Coastguard Worker$ then 902*6236dae4SAndroid Build Coastguard Worker$ if (key2 .eqs. "HAVE_LDAP_SSL") .or. - 903*6236dae4SAndroid Build Coastguard Worker (key2 .eqs. "HAVE_LDAP_URL_PARSE") 904*6236dae4SAndroid Build Coastguard Worker$ then 905*6236dae4SAndroid Build Coastguard Worker$ headf = "ldap" 906*6236dae4SAndroid Build Coastguard Worker$ endif 907*6236dae4SAndroid Build Coastguard Worker$ endif 908*6236dae4SAndroid Build Coastguard Worker$! 909*6236dae4SAndroid Build Coastguard Worker$! 910*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "FILE" 911*6236dae4SAndroid Build Coastguard Worker$ then 912*6236dae4SAndroid Build Coastguard Worker$ write sys$output "" 913*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 914*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being asked for!" 915*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 916*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-FILE_OLD, file.h will not be configured as is obsolete!" 917*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 918*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H_I-FCNTL_NEW, "Expecting fcntl.h to be configured instead!" 919*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 920*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H_I-FCNTL_CHK, "Unable to verify at this time!" 921*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 922*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 923*6236dae4SAndroid Build Coastguard Worker$! 924*6236dae4SAndroid Build Coastguard Worker$ if update_config_vms 925*6236dae4SAndroid Build Coastguard Worker$ then 926*6236dae4SAndroid Build Coastguard Worker$ open/append tfcv sys$disk:[]config_vms.h 927*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 928*6236dae4SAndroid Build Coastguard Worker$ write tfcv - 929*6236dae4SAndroid Build Coastguard Worker "/* Check config.h for use of fcntl.h instead of file.h */" 930*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 931*6236dae4SAndroid Build Coastguard Worker$ close tfcv 932*6236dae4SAndroid Build Coastguard Worker$ endif 933*6236dae4SAndroid Build Coastguard Worker$ endif 934*6236dae4SAndroid Build Coastguard Worker$! 935*6236dae4SAndroid Build Coastguard Worker$! Now look it up in the DEC C RTL 936*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------- 937*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 938*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 939*6236dae4SAndroid Build Coastguard Worker$ search/output=nl: 'dchfile' |'headf'|/exact 940*6236dae4SAndroid Build Coastguard Worker$ if '$severity' .eq. 1 941*6236dae4SAndroid Build Coastguard Worker$ then 942*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#ifndef __VAX" 943*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 944*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 945*6236dae4SAndroid Build Coastguard Worker$if p2 .nes. "" then write sys$output "''dchfile' - #define ''key2' 1" 946*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 947*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#endif" 948*6236dae4SAndroid Build Coastguard Worker$set nover 949*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 950*6236dae4SAndroid Build Coastguard Worker$ endif 951*6236dae4SAndroid Build Coastguard Worker$! 952*6236dae4SAndroid Build Coastguard Worker$! 953*6236dae4SAndroid Build Coastguard Worker$! Now look it up in the DEC C STARLET_C 954*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------- 955*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 956*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 957*6236dae4SAndroid Build Coastguard Worker$ search/output=nl: 'starhfile' |'headf'|/exact 958*6236dae4SAndroid Build Coastguard Worker$ if '$severity' .eq. 1 959*6236dae4SAndroid Build Coastguard Worker$ then 960*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#ifndef __VAX" 961*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 962*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 963*6236dae4SAndroid Build Coastguard Worker$if p2 .nes. "" then write sys$output "''starfile' - #define ''key2' 1" 964*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 965*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#endif" 966*6236dae4SAndroid Build Coastguard Worker$set nover 967*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 968*6236dae4SAndroid Build Coastguard Worker$ endif 969*6236dae4SAndroid Build Coastguard Worker$! 970*6236dae4SAndroid Build Coastguard Worker$! Now look for OPENSSL headers 971*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------------------- 972*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "OPENSSL" 973*6236dae4SAndroid Build Coastguard Worker$ then 974*6236dae4SAndroid Build Coastguard Worker$ headf = headf - "OPENSSL_" 975*6236dae4SAndroid Build Coastguard Worker$ header = f$search("''ssl_header_dir'''headf'.h") 976*6236dae4SAndroid Build Coastguard Worker$ if header .nes. "" 977*6236dae4SAndroid Build Coastguard Worker$ then 978*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 979*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 980*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 981*6236dae4SAndroid Build Coastguard Worker$set nover 982*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 983*6236dae4SAndroid Build Coastguard Worker$ endif 984*6236dae4SAndroid Build Coastguard Worker$ endif 985*6236dae4SAndroid Build Coastguard Worker$! 986*6236dae4SAndroid Build Coastguard Worker$! Now look for Kerberos 987*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------------ 988*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "GSSAPI" 989*6236dae4SAndroid Build Coastguard Worker$ then 990*6236dae4SAndroid Build Coastguard Worker$ header_dir = "sys$sysroot:[kerberos.include]" 991*6236dae4SAndroid Build Coastguard Worker$ headf = headf - "GSSAPI_" 992*6236dae4SAndroid Build Coastguard Worker$ header = f$search("''header_dir'''headf'.h") 993*6236dae4SAndroid Build Coastguard Worker$ if header .nes. "" 994*6236dae4SAndroid Build Coastguard Worker$ then 995*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 996*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 997*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 998*6236dae4SAndroid Build Coastguard Worker$set nover 999*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1000*6236dae4SAndroid Build Coastguard Worker$ endif 1001*6236dae4SAndroid Build Coastguard Worker$ endif 1002*6236dae4SAndroid Build Coastguard Worker$! 1003*6236dae4SAndroid Build Coastguard Worker$set nover 1004*6236dae4SAndroid Build Coastguard Worker$ else 1005*6236dae4SAndroid Build Coastguard Worker$! 1006*6236dae4SAndroid Build Coastguard Worker$! Looking for a routine or a symbol 1007*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------ 1008*6236dae4SAndroid Build Coastguard Worker$ if key2c .eqs. "MACRO" 1009*6236dae4SAndroid Build Coastguard Worker$ then 1010*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "FILE") .or. (key2b .eqs. "DATE") - 1011*6236dae4SAndroid Build Coastguard Worker .or. (key2b .eqs. "LINE") .or. (key2b .eqs. "TIME") 1012*6236dae4SAndroid Build Coastguard Worker$ then 1013*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_''key2b'" 1014*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_''key2b' 1" 1015*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1016*6236dae4SAndroid Build Coastguard Worker$ endif 1017*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1018*6236dae4SAndroid Build Coastguard Worker$ endif 1019*6236dae4SAndroid Build Coastguard Worker$! 1020*6236dae4SAndroid Build Coastguard Worker$! Special false tests 1021*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1022*6236dae4SAndroid Build Coastguard Worker$ if double_under 1023*6236dae4SAndroid Build Coastguard Worker$ then 1024*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "_FCNTL" .or. key2b .eqs. "__FCNTL" 1025*6236dae4SAndroid Build Coastguard Worker$ then 1026*6236dae4SAndroid Build Coastguard Worker$ write tf "/* #undef HAVE_''key2b' */" 1027*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1028*6236dae4SAndroid Build Coastguard Worker$ endif 1029*6236dae4SAndroid Build Coastguard Worker$! 1030*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "_STAT" .or. key2b .eqs. "__STAT" 1031*6236dae4SAndroid Build Coastguard Worker$ then 1032*6236dae4SAndroid Build Coastguard Worker$ write tf "/* #undef HAVE_''key2b' */" 1033*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1034*6236dae4SAndroid Build Coastguard Worker$ endif 1035*6236dae4SAndroid Build Coastguard Worker$! 1036*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "_READ" .or. key2b .eqs. "__READ" 1037*6236dae4SAndroid Build Coastguard Worker$ then 1038*6236dae4SAndroid Build Coastguard Worker$ write tf "/* #undef HAVE_''key2b' */" 1039*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1040*6236dae4SAndroid Build Coastguard Worker$ endif 1041*6236dae4SAndroid Build Coastguard Worker$ endif 1042*6236dae4SAndroid Build Coastguard Worker$! 1043*6236dae4SAndroid Build Coastguard Worker$ keysym = key2b 1044*6236dae4SAndroid Build Coastguard Worker$ if key2c .nes. "" then keysym = keysym + "_" + key2c 1045*6236dae4SAndroid Build Coastguard Worker$ if key2d .nes. "" then keysym = keysym + "_" + key2d 1046*6236dae4SAndroid Build Coastguard Worker$ if key2e .nes. "" then keysym = keysym + "_" + key2e 1047*6236dae4SAndroid Build Coastguard Worker$! 1048*6236dae4SAndroid Build Coastguard Worker$! 1049*6236dae4SAndroid Build Coastguard Worker$! Stat structure members 1050*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1051*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "STRUCT" 1052*6236dae4SAndroid Build Coastguard Worker$ then 1053*6236dae4SAndroid Build Coastguard Worker$ if key2c .eqs. "STAT" .and (key2d .nes. "") 1054*6236dae4SAndroid Build Coastguard Worker$ then 1055*6236dae4SAndroid Build Coastguard Worker$ key2b = key2b + "_" + key2c + "_" + key2d 1056*6236dae4SAndroid Build Coastguard Worker$ key2c = key2e 1057*6236dae4SAndroid Build Coastguard Worker$ key2d = "" 1058*6236dae4SAndroid Build Coastguard Worker$ key2e = "" 1059*6236dae4SAndroid Build Coastguard Worker$ endif 1060*6236dae4SAndroid Build Coastguard Worker$ endif 1061*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "ST") .or. (key2b .eqs. "STRUCT_STAT_ST") 1062*6236dae4SAndroid Build Coastguard Worker$ then 1063*6236dae4SAndroid Build Coastguard Worker$ keysym = "ST" + "_" + key2c 1064*6236dae4SAndroid Build Coastguard Worker$ keysym = f$edit(keysym,"LOWERCASE") 1065*6236dae4SAndroid Build Coastguard Worker$ endif 1066*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "STAT" 1067*6236dae4SAndroid Build Coastguard Worker$ then 1068*6236dae4SAndroid Build Coastguard Worker$ if (f$locate("STATVFS", key2b) .eq. 0) .and. key2c .eqs. "" 1069*6236dae4SAndroid Build Coastguard Worker$ then 1070*6236dae4SAndroid Build Coastguard Worker$ keysym = f$edit(key2b, "LOWERCASE") 1071*6236dae4SAndroid Build Coastguard Worker$ endif 1072*6236dae4SAndroid Build Coastguard Worker$!$ if (key2b .eqs. "STATVFS" .or. key2b .eqs. "STATFS2" - 1073*6236dae4SAndroid Build Coastguard Worker$! .or. key2b .eqs. "STATFS3") .and. key2c .nes. "" 1074*6236dae4SAndroid Build Coastguard Worker$! 1075*6236dae4SAndroid Build Coastguard Worker$ if (key2b .eqs. "STATVFS") .and. key2c .nes. "" 1076*6236dae4SAndroid Build Coastguard Worker$ then 1077*6236dae4SAndroid Build Coastguard Worker$! Should really verify that the structure 1078*6236dae4SAndroid Build Coastguard Worker$! named by key2b actually exists first. 1079*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------------ 1080*6236dae4SAndroid Build Coastguard Worker$! 1081*6236dae4SAndroid Build Coastguard Worker$! Statvfs structure members 1082*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------- 1083*6236dae4SAndroid Build Coastguard Worker$ keysym = "f_" + f$edit(key2c,"LOWERCASE") 1084*6236dae4SAndroid Build Coastguard Worker$ endif 1085*6236dae4SAndroid Build Coastguard Worker$ endif 1086*6236dae4SAndroid Build Coastguard Worker$! 1087*6236dae4SAndroid Build Coastguard Worker$! UTMPX structure members 1088*6236dae4SAndroid Build Coastguard Worker$!-------------------------------------- 1089*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "UT" .and. key2c .eqs. "UT" 1090*6236dae4SAndroid Build Coastguard Worker$ then 1091*6236dae4SAndroid Build Coastguard Worker$ keysym = "ut_" + f$edit(key2d,"LOWERCASE") 1092*6236dae4SAndroid Build Coastguard Worker$ endif 1093*6236dae4SAndroid Build Coastguard Worker$! 1094*6236dae4SAndroid Build Coastguard Worker$ if f$locate("MMAP",key2) .lt. key2_len 1095*6236dae4SAndroid Build Coastguard Worker$ then 1096*6236dae4SAndroid Build Coastguard Worker$ write sys$output "" 1097*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1098*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being asked for!" 1099*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1100*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-MMAP, MMAP operations only work on STREAM and BINARY files!" 1101*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1102*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 1103*6236dae4SAndroid Build Coastguard Worker$ if update_config_vms 1104*6236dae4SAndroid Build Coastguard Worker$ then 1105*6236dae4SAndroid Build Coastguard Worker$ open/append tfcv sys$disk:[]config_vms.h 1106*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1107*6236dae4SAndroid Build Coastguard Worker$ write tfcv - 1108*6236dae4SAndroid Build Coastguard Worker "/* Check config.h for use of ''key2' settings */" 1109*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1110*6236dae4SAndroid Build Coastguard Worker$ close tfcv 1111*6236dae4SAndroid Build Coastguard Worker$ endif 1112*6236dae4SAndroid Build Coastguard Worker$ endif 1113*6236dae4SAndroid Build Coastguard Worker$! 1114*6236dae4SAndroid Build Coastguard Worker$! 1115*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "CRYPT" 1116*6236dae4SAndroid Build Coastguard Worker$ then 1117*6236dae4SAndroid Build Coastguard Worker$ write sys$output "" 1118*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1119*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being asked for!" 1120*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1121*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-CRYPT, CRYPT operations on the VMS SYSUAF may not work!" 1122*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1123*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 1124*6236dae4SAndroid Build Coastguard Worker$ if update_config_vms 1125*6236dae4SAndroid Build Coastguard Worker$ then 1126*6236dae4SAndroid Build Coastguard Worker$ open/append tfcv sys$disk:[]config_vms.h 1127*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1128*6236dae4SAndroid Build Coastguard Worker$ write tfcv - 1129*6236dae4SAndroid Build Coastguard Worker "/* Check config.h for use of ''keysym' */" 1130*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1131*6236dae4SAndroid Build Coastguard Worker$ close tfcv 1132*6236dae4SAndroid Build Coastguard Worker$ endif 1133*6236dae4SAndroid Build Coastguard Worker$ endif 1134*6236dae4SAndroid Build Coastguard Worker$! 1135*6236dae4SAndroid Build Coastguard Worker$! 1136*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "EXECL" 1137*6236dae4SAndroid Build Coastguard Worker$ then 1138*6236dae4SAndroid Build Coastguard Worker$ write sys$output "" 1139*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1140*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being asked for!" 1141*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1142*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-EXCEL, EXECL configured, Will probably not work." 1143*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1144*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 1145*6236dae4SAndroid Build Coastguard Worker$ if update_config_vms 1146*6236dae4SAndroid Build Coastguard Worker$ then 1147*6236dae4SAndroid Build Coastguard Worker$ open/append tfcv sys$disk:[]config_vms.h 1148*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1149*6236dae4SAndroid Build Coastguard Worker$ write tfcv - 1150*6236dae4SAndroid Build Coastguard Worker "/* Check config.h for use of ''keysym' */" 1151*6236dae4SAndroid Build Coastguard Worker$ write tfcv "" 1152*6236dae4SAndroid Build Coastguard Worker$ close tfcv 1153*6236dae4SAndroid Build Coastguard Worker$ endif 1154*6236dae4SAndroid Build Coastguard Worker$ endif 1155*6236dae4SAndroid Build Coastguard Worker$! 1156*6236dae4SAndroid Build Coastguard Worker$! 1157*6236dae4SAndroid Build Coastguard Worker$! Process if cpp supports ANSI-C stringizing '#' operator 1158*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------------------------------- 1159*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "STRINGIZE" 1160*6236dae4SAndroid Build Coastguard Worker$ then 1161*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_STRINGIZE" 1162*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_STRINGSIZE 1" 1163*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1164*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1165*6236dae4SAndroid Build Coastguard Worker$ endif 1166*6236dae4SAndroid Build Coastguard Worker$! 1167*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "VOLATILE" 1168*6236dae4SAndroid Build Coastguard Worker$ then 1169*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_VOLATILE" 1170*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_VOLATILE 1" 1171*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1172*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1173*6236dae4SAndroid Build Coastguard Worker$ endif 1174*6236dae4SAndroid Build Coastguard Worker$! 1175*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "ALLOCA" 1176*6236dae4SAndroid Build Coastguard Worker$ then 1177*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_ALLOCA" 1178*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_ALLOCA 1" 1179*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1180*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1181*6236dae4SAndroid Build Coastguard Worker$ endif 1182*6236dae4SAndroid Build Coastguard Worker$! 1183*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "ERRNO_DECL" 1184*6236dae4SAndroid Build Coastguard Worker$ then 1185*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_ERRNO_DECL" 1186*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_ERRNO_DECL 1" 1187*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1188*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1189*6236dae4SAndroid Build Coastguard Worker$ endif 1190*6236dae4SAndroid Build Coastguard Worker$! 1191*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "LONGLONG" 1192*6236dae4SAndroid Build Coastguard Worker$ then 1193*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1194*6236dae4SAndroid Build Coastguard Worker$ write tf "#pragma message disable longlongtype" 1195*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_LONGLONG" 1196*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_LONGLONG 1" 1197*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1198*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1199*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1200*6236dae4SAndroid Build Coastguard Worker$ endif 1201*6236dae4SAndroid Build Coastguard Worker$! 1202*6236dae4SAndroid Build Coastguard Worker$! May need to test compiler version 1203*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 1204*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "LONG_LONG" 1205*6236dae4SAndroid Build Coastguard Worker$ then 1206*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1207*6236dae4SAndroid Build Coastguard Worker$ write tf "#pragma message disable longlongtype" 1208*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_LONG_LONG" 1209*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_LONG_LONG 1" 1210*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1211*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1212*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1213*6236dae4SAndroid Build Coastguard Worker$ endif 1214*6236dae4SAndroid Build Coastguard Worker$! 1215*6236dae4SAndroid Build Coastguard Worker$! May need to test compiler version 1216*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 1217*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "UNSIGNED_LONG_LONG" 1218*6236dae4SAndroid Build Coastguard Worker$ then 1219*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1220*6236dae4SAndroid Build Coastguard Worker$ write tf "#pragma message disable longlongtype" 1221*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG" 1222*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_UNSIGNED_LONG_LONG 1" 1223*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1224*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1225*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1226*6236dae4SAndroid Build Coastguard Worker$ endif 1227*6236dae4SAndroid Build Coastguard Worker$! 1228*6236dae4SAndroid Build Coastguard Worker$! May need to test compiler version 1229*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 1230*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "UNSIGNED_LONG_LONG_INT" 1231*6236dae4SAndroid Build Coastguard Worker$ then 1232*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1233*6236dae4SAndroid Build Coastguard Worker$ write tf "#pragma message disable longlongtype" 1234*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG_INT" 1235*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_UNSIGNED_LONG_LONG_INT 1" 1236*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1237*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1238*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1239*6236dae4SAndroid Build Coastguard Worker$ endif 1240*6236dae4SAndroid Build Coastguard Worker$! 1241*6236dae4SAndroid Build Coastguard Worker$! May need to test compiler version 1242*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------- 1243*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "LONG_DOUBLE" 1244*6236dae4SAndroid Build Coastguard Worker$ then 1245*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1246*6236dae4SAndroid Build Coastguard Worker$ write tf "#pragma message disable longlongtype" 1247*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_LONG_DOUBLE" 1248*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_LONG_DOUBLE 1" 1249*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1250*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1251*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1252*6236dae4SAndroid Build Coastguard Worker$ endif 1253*6236dae4SAndroid Build Coastguard Worker$! 1254*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "FCNTL_LOCK" 1255*6236dae4SAndroid Build Coastguard Worker$ then 1256*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1257*6236dae4SAndroid Build Coastguard Worker "%CONFIG_H-I-NONPORT, ''key2' being asked for! 1258*6236dae4SAndroid Build Coastguard Worker$ write sys$output - 1259*6236dae4SAndroid Build Coastguard Worker "-CONFIG_H-I-REVIEW, Manual Code review required!" 1260*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1261*6236dae4SAndroid Build Coastguard Worker$ endif 1262*6236dae4SAndroid Build Coastguard Worker$! 1263*6236dae4SAndroid Build Coastguard Worker$! 1264*6236dae4SAndroid Build Coastguard Worker$! These libraries are provided by the DEC C RTL 1265*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------------- 1266*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "LIBINET" .or. keysym .eqs. "LIBSOCKET" 1267*6236dae4SAndroid Build Coastguard Worker$ then 1268*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef HAVE_''keysym'" 1269*6236dae4SAndroid Build Coastguard Worker$ write tf "#define HAVE_''keysym' 1" 1270*6236dae4SAndroid Build Coastguard Worker$if p2 .nes. "" then write sys$output "''decc_shr' #define ''keysym' 1" 1271*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif 1272*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1273*6236dae4SAndroid Build Coastguard Worker$ endif 1274*6236dae4SAndroid Build Coastguard Worker$! 1275*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "HERRNO" then keysym = "h_errno" 1276*6236dae4SAndroid Build Coastguard Worker$ if keysym .eqs. "UTIMBUF" then keysym = "utimbuf" 1277*6236dae4SAndroid Build Coastguard Worker$ if key2c .eqs. "STRUCT" 1278*6236dae4SAndroid Build Coastguard Worker$ then 1279*6236dae4SAndroid Build Coastguard Worker$ keysym = f$edit(key2d,"LOWERCASE") 1280*6236dae4SAndroid Build Coastguard Worker$ else 1281*6236dae4SAndroid Build Coastguard Worker$ if key2_h .eqs. "_T" 1282*6236dae4SAndroid Build Coastguard Worker$ then 1283*6236dae4SAndroid Build Coastguard Worker$ if key2_t .eqs. "_TYPE" 1284*6236dae4SAndroid Build Coastguard Worker$ then 1285*6236dae4SAndroid Build Coastguard Worker$ keysym = f$extract(0, key2_len - 5, key2) - "HAVE_" 1286*6236dae4SAndroid Build Coastguard Worker$ endif 1287*6236dae4SAndroid Build Coastguard Worker$ keysym = f$edit(keysym,"LOWERCASE") 1288*6236dae4SAndroid Build Coastguard Worker$ endif 1289*6236dae4SAndroid Build Coastguard Worker$ endif 1290*6236dae4SAndroid Build Coastguard Worker$! 1291*6236dae4SAndroid Build Coastguard Worker$! Check the DEC C RTL shared image first 1292*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------ 1293*6236dae4SAndroid Build Coastguard Worker$ if f$search(tfile1) .nes. "" then delete 'tfile1';* 1294*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1295*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1296*6236dae4SAndroid Build Coastguard Worker$ search/format=nonull/out='tfile1' 'decc_shr' 'keysym' 1297*6236dae4SAndroid Build Coastguard Worker$ if '$severity' .eq. 1 1298*6236dae4SAndroid Build Coastguard Worker$ then 1299*6236dae4SAndroid Build Coastguard Worker$! 1300*6236dae4SAndroid Build Coastguard Worker$! Not documented, but from observation 1301*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------ 1302*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1303*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1304*6236dae4SAndroid Build Coastguard Worker$ if arch_type .eq. 3 1305*6236dae4SAndroid Build Coastguard Worker$ then 1306*6236dae4SAndroid Build Coastguard Worker$ keyterm = "''keysym'<SOH>" 1307*6236dae4SAndroid Build Coastguard Worker$ else 1308*6236dae4SAndroid Build Coastguard Worker$ if arch_type .eq. 2 1309*6236dae4SAndroid Build Coastguard Worker$ then 1310*6236dae4SAndroid Build Coastguard Worker$ keyterm = "''keysym'<BS>" 1311*6236dae4SAndroid Build Coastguard Worker$ else 1312*6236dae4SAndroid Build Coastguard Worker$ keyterm = "''keysym'<STX>" 1313*6236dae4SAndroid Build Coastguard Worker$ endif 1314*6236dae4SAndroid Build Coastguard Worker$ endif 1315*6236dae4SAndroid Build Coastguard Worker$ search/out=nl: 'tfile1' - 1316*6236dae4SAndroid Build Coastguard Worker "$''keyterm'","$g''keyterm'","$__utc_''keyterm'",- 1317*6236dae4SAndroid Build Coastguard Worker "$__utctz_''keyterm'","$__bsd44_''keyterm'","$bsd_''keyterm'",- 1318*6236dae4SAndroid Build Coastguard Worker "$''keysym'decc$","$G''keysym'decc$","$GX''keyterm'" 1319*6236dae4SAndroid Build Coastguard Worker$ severity = '$severity' 1320*6236dae4SAndroid Build Coastguard Worker$! 1321*6236dae4SAndroid Build Coastguard Worker$! 1322*6236dae4SAndroid Build Coastguard Worker$! Of course the 64-bit stuff is different 1323*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------------------- 1324*6236dae4SAndroid Build Coastguard Worker$ if severity .ne. 1 .and. key64 1325*6236dae4SAndroid Build Coastguard Worker$ then 1326*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1327*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1328*6236dae4SAndroid Build Coastguard Worker$ search/out=nl: 'tfile1' "$_''keyterm'" 1329*6236dae4SAndroid Build Coastguard Worker$! search/out 'tfile1' "$_''keyterm'" 1330*6236dae4SAndroid Build Coastguard Worker$ severity = '$severity' 1331*6236dae4SAndroid Build Coastguard Worker$ endif 1332*6236dae4SAndroid Build Coastguard Worker$! 1333*6236dae4SAndroid Build Coastguard Worker$! Unix compatibility routines 1334*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------- 1335*6236dae4SAndroid Build Coastguard Worker$ if severity .ne. 1 1336*6236dae4SAndroid Build Coastguard Worker$ then 1337*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1338*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1339*6236dae4SAndroid Build Coastguard Worker$ search/out=nl: 'tfile1' - 1340*6236dae4SAndroid Build Coastguard Worker "$__unix_''keyterm'","$__vms_''keyterm'","$_posix_''keyterm'" 1341*6236dae4SAndroid Build Coastguard Worker$ severity = '$severity' 1342*6236dae4SAndroid Build Coastguard Worker$ endif 1343*6236dae4SAndroid Build Coastguard Worker$! 1344*6236dae4SAndroid Build Coastguard Worker$! Show the result of the search 1345*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------ 1346*6236dae4SAndroid Build Coastguard Worker$ if 'severity' .eq. 1 1347*6236dae4SAndroid Build Coastguard Worker$ then 1348*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#ifndef __VAX" 1349*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1350*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 1351*6236dae4SAndroid Build Coastguard Worker$if p2 .nes. "" then write sys$output "''decc_shr' #define ''key2' 1" 1352*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1353*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#endif" 1354*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1355*6236dae4SAndroid Build Coastguard Worker$ endif 1356*6236dae4SAndroid Build Coastguard Worker$ endif 1357*6236dae4SAndroid Build Coastguard Worker$ if f$search(tfile1) .nes. "" then delete 'tfile1';* 1358*6236dae4SAndroid Build Coastguard Worker$! 1359*6236dae4SAndroid Build Coastguard Worker$! Check the DECC Header files next 1360*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------- 1361*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1362*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1363*6236dae4SAndroid Build Coastguard Worker$ search/out=nl: 'decc_rtldef' - 1364*6236dae4SAndroid Build Coastguard Worker "''keysym';", "''keysym'[", "struct ''keysym'"/exact 1365*6236dae4SAndroid Build Coastguard Worker$ severity = '$severity' 1366*6236dae4SAndroid Build Coastguard Worker$ if severity .eq. 1 1367*6236dae4SAndroid Build Coastguard Worker$ then 1368*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#ifndef __VAX" 1369*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1370*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 1371*6236dae4SAndroid Build Coastguard Worker$if p2 .nes. "" then write sys$output "''decc_rtldef' #define ''key2' 1" 1372*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1373*6236dae4SAndroid Build Coastguard Worker$ if key64 then write tf "#endif" 1374*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1375*6236dae4SAndroid Build Coastguard Worker$ endif 1376*6236dae4SAndroid Build Coastguard Worker$! 1377*6236dae4SAndroid Build Coastguard Worker$! Check kerberos 1378*6236dae4SAndroid Build Coastguard Worker$!-------------------------------------------- 1379*6236dae4SAndroid Build Coastguard Worker$ if f$search("SYS$SYSROOT:[kerberos]include.dir") .nes. "" 1380*6236dae4SAndroid Build Coastguard Worker$ then 1381*6236dae4SAndroid Build Coastguard Worker$ test_mit = "SYS$SYSROOT:[kerberos.include]gssapi_krb5.h" 1382*6236dae4SAndroid Build Coastguard Worker$ if (key2 .eqs. "HAVE_GSSAPI") 1383*6236dae4SAndroid Build Coastguard Worker$ then 1384*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1385*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' 1" 1386*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1387*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1388*6236dae4SAndroid Build Coastguard Worker$ endif 1389*6236dae4SAndroid Build Coastguard Worker$ endif 1390*6236dae4SAndroid Build Coastguard Worker$! 1391*6236dae4SAndroid Build Coastguard Worker$ endif 1392*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1393*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1394*6236dae4SAndroid Build Coastguard Worker$ endif 1395*6236dae4SAndroid Build Coastguard Worker$! 1396*6236dae4SAndroid Build Coastguard Worker$! 1397*6236dae4SAndroid Build Coastguard Worker$! Process SIZEOF directives found in SAMBA and others 1398*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------- 1399*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "SIZEOF" 1400*6236dae4SAndroid Build Coastguard Worker$ then 1401*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "INO" .and. key2_h .eqs. "_T" 1402*6236dae4SAndroid Build Coastguard Worker$ then 1403*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_INO_T" 1404*6236dae4SAndroid Build Coastguard Worker$ write tf "#if !__USING_STD_STAT 1405*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_INO_T 6" 1406*6236dae4SAndroid Build Coastguard Worker$ write tf "#else 1407*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_INO_T 8" 1408*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif 1409*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1410*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1411*6236dae4SAndroid Build Coastguard Worker$ endif 1412*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "INTMAX" .and. key2_h .eqs. "_T" 1413*6236dae4SAndroid Build Coastguard Worker$ then 1414*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_INTMAX_T" 1415*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifdef __VAX" 1416*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_INTMAX_T 4" 1417*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 1418*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_INTMAX_T 8" 1419*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1420*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1421*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1422*6236dae4SAndroid Build Coastguard Worker$ endif 1423*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "OFF" .and. key2_h .eqs. "_T" 1424*6236dae4SAndroid Build Coastguard Worker$ then 1425*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_OFF_T" 1426*6236dae4SAndroid Build Coastguard Worker$ write tf "#if __USE_OFF64_T" 1427*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_OFF_T 8" 1428*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 1429*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_OFF_T 4" 1430*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1431*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1432*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1433*6236dae4SAndroid Build Coastguard Worker$ endif 1434*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "CHAR" .and. key2_h .eqs. "_P" 1435*6236dae4SAndroid Build Coastguard Worker$ then 1436*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_CHAR_P" 1437*6236dae4SAndroid Build Coastguard Worker$ write tf "#if __INITIAL_POINTER_SIZE == 64" 1438*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_CHAR_P 8" 1439*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 1440*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_CHAR_P 4" 1441*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1442*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1443*6236dae4SAndroid Build Coastguard Worker$ endif 1444*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "VOIDP" 1445*6236dae4SAndroid Build Coastguard Worker$ then 1446*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_VOIDP" 1447*6236dae4SAndroid Build Coastguard Worker$ write tf "#if __INITIAL_POINTER_SIZE == 64" 1448*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_VOIDP 8" 1449*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 1450*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_VOIDP 4" 1451*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1452*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1453*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1454*6236dae4SAndroid Build Coastguard Worker$ endif 1455*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "INT" 1456*6236dae4SAndroid Build Coastguard Worker$ then 1457*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_INT" 1458*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_INT 4" 1459*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1460*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1461*6236dae4SAndroid Build Coastguard Worker$ endif 1462*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "SIZE" .and. key2_h .eqs. "_T" 1463*6236dae4SAndroid Build Coastguard Worker$ then 1464*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_SIZE_T" 1465*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_SIZE_T 4" 1466*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1467*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1468*6236dae4SAndroid Build Coastguard Worker$ endif 1469*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "TIME" .and. key2_h .eqs. "_T" 1470*6236dae4SAndroid Build Coastguard Worker$ then 1471*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_TIME_T" 1472*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_TIME_T 4" 1473*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1474*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1475*6236dae4SAndroid Build Coastguard Worker$ endif 1476*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "DOUBLE" 1477*6236dae4SAndroid Build Coastguard Worker$ then 1478*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_DOUBLE" 1479*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_DOUBLE 8" 1480*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1481*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1482*6236dae4SAndroid Build Coastguard Worker$ endif 1483*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "LONG" 1484*6236dae4SAndroid Build Coastguard Worker$ then 1485*6236dae4SAndroid Build Coastguard Worker$ if key2c .eqs. "" 1486*6236dae4SAndroid Build Coastguard Worker$ then 1487*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_LONG" 1488*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_LONG 4" 1489*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1490*6236dae4SAndroid Build Coastguard Worker$ else 1491*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SIZEOF_LONG_LONG" 1492*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef __VAX" 1493*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SIZEOF_LONG_LONG 8" 1494*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1495*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1496*6236dae4SAndroid Build Coastguard Worker$ endif 1497*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1498*6236dae4SAndroid Build Coastguard Worker$ endif 1499*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1500*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1501*6236dae4SAndroid Build Coastguard Worker$ endif 1502*6236dae4SAndroid Build Coastguard Worker$! 1503*6236dae4SAndroid Build Coastguard Worker$! Process NEED directives 1504*6236dae4SAndroid Build Coastguard Worker$!------------------------------- 1505*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "NEED" 1506*6236dae4SAndroid Build Coastguard Worker$ then 1507*6236dae4SAndroid Build Coastguard Worker$ if key2b .eqs. "STRINGS" .and. key2_h .eqs. "_H" 1508*6236dae4SAndroid Build Coastguard Worker$ then 1509*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef NEED_STRINGS_H" 1510*6236dae4SAndroid Build Coastguard Worker$ write tf "#define NEED_STRINGS_H 1" 1511*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1512*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1513*6236dae4SAndroid Build Coastguard Worker$ endif 1514*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1515*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1516*6236dae4SAndroid Build Coastguard Worker$ endif 1517*6236dae4SAndroid Build Coastguard Worker$! 1518*6236dae4SAndroid Build Coastguard Worker$! Process GETHOSTNAME directives 1519*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1520*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETHOSTNAME_TYPE_ARG2" 1521*6236dae4SAndroid Build Coastguard Worker$ then 1522*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1523*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifdef _DECC_V4_SOURCE" 1524*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1525*6236dae4SAndroid Build Coastguard Worker$ write tf "#else" 1526*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' size_t" 1527*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1528*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1529*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1530*6236dae4SAndroid Build Coastguard Worker$ endif 1531*6236dae4SAndroid Build Coastguard Worker$! 1532*6236dae4SAndroid Build Coastguard Worker$! Process GETNAMEINFO directives 1533*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1534*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "GETNAMEINFO" 1535*6236dae4SAndroid Build Coastguard Worker$ then 1536*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETNAMEINFO_QUAL_ARG1" 1537*6236dae4SAndroid Build Coastguard Worker$ then 1538*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1539*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' const" 1540*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1541*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1542*6236dae4SAndroid Build Coastguard Worker$ endif 1543*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG1" 1544*6236dae4SAndroid Build Coastguard Worker$ then 1545*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1546*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' struct sockaddr *" 1547*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1548*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1549*6236dae4SAndroid Build Coastguard Worker$ endif 1550*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG2" 1551*6236dae4SAndroid Build Coastguard Worker$ then 1552*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1553*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' size_t" 1554*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1555*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1556*6236dae4SAndroid Build Coastguard Worker$ endif 1557*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG46" 1558*6236dae4SAndroid Build Coastguard Worker$ then 1559*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1560*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' size_t" 1561*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1562*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1563*6236dae4SAndroid Build Coastguard Worker$ endif 1564*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG7" 1565*6236dae4SAndroid Build Coastguard Worker$ then 1566*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1567*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1568*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1569*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1570*6236dae4SAndroid Build Coastguard Worker$ endif 1571*6236dae4SAndroid Build Coastguard Worker$ endif 1572*6236dae4SAndroid Build Coastguard Worker$! 1573*6236dae4SAndroid Build Coastguard Worker$! Process RECV directives 1574*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1575*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "RECV" 1576*6236dae4SAndroid Build Coastguard Worker$ then 1577*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "RECV_TYPE_ARG1" 1578*6236dae4SAndroid Build Coastguard Worker$ then 1579*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1580*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1581*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1582*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1583*6236dae4SAndroid Build Coastguard Worker$ endif 1584*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "RECV_TYPE_ARG2" 1585*6236dae4SAndroid Build Coastguard Worker$ then 1586*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1587*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' void *" 1588*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1589*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1590*6236dae4SAndroid Build Coastguard Worker$ endif 1591*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "RECV_TYPE_ARG3" 1592*6236dae4SAndroid Build Coastguard Worker$ then 1593*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1594*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' size_t" 1595*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1596*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1597*6236dae4SAndroid Build Coastguard Worker$ endif 1598*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "RECV_TYPE_ARG4" 1599*6236dae4SAndroid Build Coastguard Worker$ then 1600*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1601*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1602*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1603*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1604*6236dae4SAndroid Build Coastguard Worker$ endif 1605*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "RECV_TYPE_RETV" 1606*6236dae4SAndroid Build Coastguard Worker$ then 1607*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1608*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1609*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1610*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1611*6236dae4SAndroid Build Coastguard Worker$ endif 1612*6236dae4SAndroid Build Coastguard Worker$ endif 1613*6236dae4SAndroid Build Coastguard Worker$! 1614*6236dae4SAndroid Build Coastguard Worker$! Process SEND directives 1615*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1616*6236dae4SAndroid Build Coastguard Worker$ if key2a .eqs. "SEND" 1617*6236dae4SAndroid Build Coastguard Worker$ then 1618*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_QUAL_ARG2" 1619*6236dae4SAndroid Build Coastguard Worker$ then 1620*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1621*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' const" 1622*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1623*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1624*6236dae4SAndroid Build Coastguard Worker$ endif 1625*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_TYPE_ARG1" 1626*6236dae4SAndroid Build Coastguard Worker$ then 1627*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1628*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1629*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1630*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1631*6236dae4SAndroid Build Coastguard Worker$ endif 1632*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_TYPE_ARG2" 1633*6236dae4SAndroid Build Coastguard Worker$ then 1634*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1635*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' void *" 1636*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1637*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1638*6236dae4SAndroid Build Coastguard Worker$ endif 1639*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_TYPE_ARG3" 1640*6236dae4SAndroid Build Coastguard Worker$ then 1641*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1642*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' size_t" 1643*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1644*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1645*6236dae4SAndroid Build Coastguard Worker$ endif 1646*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_TYPE_ARG4" 1647*6236dae4SAndroid Build Coastguard Worker$ then 1648*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1649*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1650*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1651*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1652*6236dae4SAndroid Build Coastguard Worker$ endif 1653*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEND_TYPE_RETV" 1654*6236dae4SAndroid Build Coastguard Worker$ then 1655*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1656*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ''key2' int" 1657*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1658*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1659*6236dae4SAndroid Build Coastguard Worker$ endif 1660*6236dae4SAndroid Build Coastguard Worker$ endif 1661*6236dae4SAndroid Build Coastguard Worker$! 1662*6236dae4SAndroid Build Coastguard Worker$! 1663*6236dae4SAndroid Build Coastguard Worker$! Process STATFS directives 1664*6236dae4SAndroid Build Coastguard Worker$!------------------------------- 1665*6236dae4SAndroid Build Coastguard Worker$! if key2a .eqs. "STATFS" 1666*6236dae4SAndroid Build Coastguard Worker$! then 1667*6236dae4SAndroid Build Coastguard Worker$! write tf "/* ", xline, " */" 1668*6236dae4SAndroid Build Coastguard Worker$! goto cfgh_in_loop1 1669*6236dae4SAndroid Build Coastguard Worker$! endif 1670*6236dae4SAndroid Build Coastguard Worker$! 1671*6236dae4SAndroid Build Coastguard Worker$! Process inline directive 1672*6236dae4SAndroid Build Coastguard Worker$!------------------------------ 1673*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "inline" 1674*6236dae4SAndroid Build Coastguard Worker$ then 1675*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef inline" 1676*6236dae4SAndroid Build Coastguard Worker$ write tf "#define inline __inline" 1677*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1678*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1679*6236dae4SAndroid Build Coastguard Worker$ endif 1680*6236dae4SAndroid Build Coastguard Worker$! 1681*6236dae4SAndroid Build Coastguard Worker$! Process restrict directive 1682*6236dae4SAndroid Build Coastguard Worker$!-------------------------------- 1683*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "restrict" 1684*6236dae4SAndroid Build Coastguard Worker$ then 1685*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef restrict" 1686*6236dae4SAndroid Build Coastguard Worker$ write tf "#define restrict __restrict" 1687*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1688*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1689*6236dae4SAndroid Build Coastguard Worker$ endif 1690*6236dae4SAndroid Build Coastguard Worker$! 1691*6236dae4SAndroid Build Coastguard Worker$! Process STDC_HEADERS (SAMBA!) 1692*6236dae4SAndroid Build Coastguard Worker$!--------------------------- 1693*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "STDC_HEADERS" 1694*6236dae4SAndroid Build Coastguard Worker$ then 1695*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef STDC_HEADERS" 1696*6236dae4SAndroid Build Coastguard Worker$ write tf "#define STDC_HEADERS 1" 1697*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1698*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1699*6236dae4SAndroid Build Coastguard Worker$ endif 1700*6236dae4SAndroid Build Coastguard Worker$! 1701*6236dae4SAndroid Build Coastguard Worker$! Process PROTOTYPES directive 1702*6236dae4SAndroid Build Coastguard Worker$!------------------------------------- 1703*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "PROTOTYPES" 1704*6236dae4SAndroid Build Coastguard Worker$ then 1705*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef PROTOTYPES" 1706*6236dae4SAndroid Build Coastguard Worker$ write tf "#define PROTOTYPES 1" 1707*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1708*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1709*6236dae4SAndroid Build Coastguard Worker$ endif 1710*6236dae4SAndroid Build Coastguard Worker$! 1711*6236dae4SAndroid Build Coastguard Worker$! Special for SEEKDIR_RETURNS_VOID 1712*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------- 1713*6236dae4SAndroid Build Coastguard Worker$ if key2 .eqs. "SEEKDIR_RETURNS_VOID" 1714*6236dae4SAndroid Build Coastguard Worker$ then 1715*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef SEEKDIR_RETURNS_VOID" 1716*6236dae4SAndroid Build Coastguard Worker$ write tf "#define SEEKDIR_RETURNS_VOID 1" 1717*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1718*6236dae4SAndroid Build Coastguard Worker$ endif 1719*6236dae4SAndroid Build Coastguard Worker$! 1720*6236dae4SAndroid Build Coastguard Worker$! Unknown - See if CONFIGURE can give a clue for this 1721*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------- 1722*6236dae4SAndroid Build Coastguard Worker$ pflag = 0 1723*6236dae4SAndroid Build Coastguard Worker$ set_flag = 0 1724*6236dae4SAndroid Build Coastguard Worker$! gproj_name = proj_name - "_VMS" - "-VMS" 1725*6236dae4SAndroid Build Coastguard Worker$ if f$search(tfile1) .nes. "" then delete 'tfile1';* 1726*6236dae4SAndroid Build Coastguard Worker$ define/user sys$output nl: 1727*6236dae4SAndroid Build Coastguard Worker$ define/user sys$error nl: 1728*6236dae4SAndroid Build Coastguard Worker$! if f$locate("FILE", key2) .lt. key2_len then pflag = 1 1729*6236dae4SAndroid Build Coastguard Worker$! if f$locate("DIR", key2) .eq. key2_len - 3 then pflag = 1 1730*6236dae4SAndroid Build Coastguard Worker$! if f$locate("PATH", key2) .eq. key2_len - 4 then pflag = 1 1731*6236dae4SAndroid Build Coastguard Worker$! 1732*6236dae4SAndroid Build Coastguard Worker$ search/out='tfile1' 'configure_script' "''key2'="/exact 1733*6236dae4SAndroid Build Coastguard Worker$ search_sev = '$severity' 1734*6236dae4SAndroid Build Coastguard Worker$ if 'search_sev' .eq. 1 1735*6236dae4SAndroid Build Coastguard Worker$ then 1736*6236dae4SAndroid Build Coastguard Worker$ open/read/err=unknown_cf_rd_error sf 'tfile1' 1737*6236dae4SAndroid Build Coastguard Worker$search_file_rd_loop: 1738*6236dae4SAndroid Build Coastguard Worker$ read/end=unknown_cf_rd_err sf line_in 1739*6236dae4SAndroid Build Coastguard Worker$ line_in = f$edit(line_in, "TRIM") 1740*6236dae4SAndroid Build Coastguard Worker$ skey1 = f$element(0,"=",line_in) 1741*6236dae4SAndroid Build Coastguard Worker$ if skey1 .eqs. key2 1742*6236dae4SAndroid Build Coastguard Worker$ then 1743*6236dae4SAndroid Build Coastguard Worker$ skey2 = f$element(1,"=",line_in) 1744*6236dae4SAndroid Build Coastguard Worker$ skey2a = f$extract(0,2,skey2) 1745*6236dae4SAndroid Build Coastguard Worker$! 1746*6236dae4SAndroid Build Coastguard Worker$! 1747*6236dae4SAndroid Build Coastguard Worker$! We can not handle assignment to shell symbols. 1748*6236dae4SAndroid Build Coastguard Worker$! For now skip them. 1749*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------------------------ 1750*6236dae4SAndroid Build Coastguard Worker$ if f$locate("$", skey2) .lt. f$length(skey2) 1751*6236dae4SAndroid Build Coastguard Worker$ then 1752*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1753*6236dae4SAndroid Build Coastguard Worker$ set_flag = 1 1754*6236dae4SAndroid Build Coastguard Worker$ goto found_in_configure 1755*6236dae4SAndroid Build Coastguard Worker$ endif 1756*6236dae4SAndroid Build Coastguard Worker$! 1757*6236dae4SAndroid Build Coastguard Worker$! Keep these two cases separate to make it easier to add 1758*6236dae4SAndroid Build Coastguard Worker$! more future intelligence to this routine 1759*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------------------- 1760*6236dae4SAndroid Build Coastguard Worker$ if skey2a .eqs. """`" 1761*6236dae4SAndroid Build Coastguard Worker$ then 1762*6236dae4SAndroid Build Coastguard Worker$! if pflag .eq. 1 1763*6236dae4SAndroid Build Coastguard Worker$! then 1764*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 1765*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ",key2," """,gproj_name,"_",key2,"""" 1766*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 1767*6236dae4SAndroid Build Coastguard Worker$! else 1768*6236dae4SAndroid Build Coastguard Worker$! Ignore this for now 1769*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------ 1770*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1771*6236dae4SAndroid Build Coastguard Worker$! endif 1772*6236dae4SAndroid Build Coastguard Worker$ set_flag = 1 1773*6236dae4SAndroid Build Coastguard Worker$ goto found_in_configure 1774*6236dae4SAndroid Build Coastguard Worker$ endif 1775*6236dae4SAndroid Build Coastguard Worker$ if skey2a .eqs. """$" 1776*6236dae4SAndroid Build Coastguard Worker$ then 1777*6236dae4SAndroid Build Coastguard Worker$! if pflag .eq. 1 1778*6236dae4SAndroid Build Coastguard Worker$! then 1779*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 1780*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ",key2," """,gproj_name,"_",key2,"""" 1781*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 1782*6236dae4SAndroid Build Coastguard Worker$! else 1783*6236dae4SAndroid Build Coastguard Worker$! Ignore this for now 1784*6236dae4SAndroid Build Coastguard Worker$!------------------------------------------- 1785*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1786*6236dae4SAndroid Build Coastguard Worker$! endif 1787*6236dae4SAndroid Build Coastguard Worker$ set_flag = 1 1788*6236dae4SAndroid Build Coastguard Worker$ goto found_in_configure 1789*6236dae4SAndroid Build Coastguard Worker$ endif 1790*6236dae4SAndroid Build Coastguard Worker$! 1791*6236dae4SAndroid Build Coastguard Worker$! Remove multiple layers of quotes if present 1792*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------- 1793*6236dae4SAndroid Build Coastguard Worker$ if f$extract(0, 1, skey2) .eqs. "'" 1794*6236dae4SAndroid Build Coastguard Worker$ then 1795*6236dae4SAndroid Build Coastguard Worker$ skey2 = skey2 - "'" - "'" - "'" - "'" 1796*6236dae4SAndroid Build Coastguard Worker$ endif 1797*6236dae4SAndroid Build Coastguard Worker$ if f$extract(0, 1, skey2) .eqs. """" 1798*6236dae4SAndroid Build Coastguard Worker$ then 1799*6236dae4SAndroid Build Coastguard Worker$ skey2 = skey2 - """" - """" - """" - """" 1800*6236dae4SAndroid Build Coastguard Worker$ endif 1801*6236dae4SAndroid Build Coastguard Worker$ write tf "#ifndef ''key2'" 1802*6236dae4SAndroid Build Coastguard Worker$ if skey2 .eqs. "" 1803*6236dae4SAndroid Build Coastguard Worker$ then 1804*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ",key2 1805*6236dae4SAndroid Build Coastguard Worker$ else 1806*6236dae4SAndroid Build Coastguard Worker$! Only quote non-numbers 1807*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------- 1808*6236dae4SAndroid Build Coastguard Worker$ if f$string(skey2+0) .eqs. skey2 1809*6236dae4SAndroid Build Coastguard Worker$ then 1810*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ",key2," ",skey2 1811*6236dae4SAndroid Build Coastguard Worker$ else 1812*6236dae4SAndroid Build Coastguard Worker$ write tf "#define ",key2," """,skey2,"""" 1813*6236dae4SAndroid Build Coastguard Worker$ endif 1814*6236dae4SAndroid Build Coastguard Worker$ endif 1815*6236dae4SAndroid Build Coastguard Worker$ write tf "#endif" 1816*6236dae4SAndroid Build Coastguard Worker$ set_flag = 1 1817*6236dae4SAndroid Build Coastguard Worker$ else 1818*6236dae4SAndroid Build Coastguard Worker$ goto search_file_rd_loop 1819*6236dae4SAndroid Build Coastguard Worker$! if pflag .eq. 1 1820*6236dae4SAndroid Build Coastguard Worker$! then 1821*6236dae4SAndroid Build Coastguard Worker$! write tf "#ifndef ''key2'" 1822*6236dae4SAndroid Build Coastguard Worker$! write tf "#define ",key2," """,gproj_name,"_",key2,"""" 1823*6236dae4SAndroid Build Coastguard Worker$! write tf "#endif" 1824*6236dae4SAndroid Build Coastguard Worker$! set_flag = 1 1825*6236dae4SAndroid Build Coastguard Worker$! endif 1826*6236dae4SAndroid Build Coastguard Worker$ endif 1827*6236dae4SAndroid Build Coastguard Worker$found_in_configure: 1828*6236dae4SAndroid Build Coastguard Worker$unknown_cf_rd_err: 1829*6236dae4SAndroid Build Coastguard Worker$ if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" 1830*6236dae4SAndroid Build Coastguard Worker$ then 1831*6236dae4SAndroid Build Coastguard Worker$ close sf 1832*6236dae4SAndroid Build Coastguard Worker$ endif 1833*6236dae4SAndroid Build Coastguard Worker$ if f$search(tfile1) .nes. "" then delete 'tfile1';* 1834*6236dae4SAndroid Build Coastguard Worker$ if set_flag .eq. 1 then goto cfgh_in_loop1 1835*6236dae4SAndroid Build Coastguard Worker$ endif 1836*6236dae4SAndroid Build Coastguard Worker$ endif 1837*6236dae4SAndroid Build Coastguard Worker$! 1838*6236dae4SAndroid Build Coastguard Worker$! 1839*6236dae4SAndroid Build Coastguard Worker$! 1840*6236dae4SAndroid Build Coastguard Worker$! If it falls through everything else, comment it out 1841*6236dae4SAndroid Build Coastguard Worker$!----------------------------------------------------- 1842*6236dae4SAndroid Build Coastguard Worker$ write tf "/* ", xline, " */" 1843*6236dae4SAndroid Build Coastguard Worker$ goto cfgh_in_loop1 1844*6236dae4SAndroid Build Coastguard Worker$cfgh_in_loop1_end: 1845*6236dae4SAndroid Build Coastguard Worker$close inf 1846*6236dae4SAndroid Build Coastguard Worker$! 1847*6236dae4SAndroid Build Coastguard Worker$! 1848*6236dae4SAndroid Build Coastguard Worker$! Write out the tail 1849*6236dae4SAndroid Build Coastguard Worker$!-------------------- 1850*6236dae4SAndroid Build Coastguard Worker$write_tail: 1851*6236dae4SAndroid Build Coastguard Worker$gosub write_config_h_tail 1852*6236dae4SAndroid Build Coastguard Worker$! 1853*6236dae4SAndroid Build Coastguard Worker$! Exit and clean up 1854*6236dae4SAndroid Build Coastguard Worker$!-------------------- 1855*6236dae4SAndroid Build Coastguard Worker$general_error: 1856*6236dae4SAndroid Build Coastguard Worker$status = '$status' 1857*6236dae4SAndroid Build Coastguard Worker$all_exit: 1858*6236dae4SAndroid Build Coastguard Worker$set noon 1859*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" then close sf 1860*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf 1861*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf 1862*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 1863*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 1864*6236dae4SAndroid Build Coastguard Worker$if f$trnlnm("tfcv","lnm$process",,"SUPERVISOR") .nes. "" then close tfcv 1865*6236dae4SAndroid Build Coastguard Worker$if f$type(tfile1) .eqs. "STRING" 1866*6236dae4SAndroid Build Coastguard Worker$then 1867*6236dae4SAndroid Build Coastguard Worker$ if f$search(tfile1) .nes. "" then delete 'tfile1';* 1868*6236dae4SAndroid Build Coastguard Worker$endif 1869*6236dae4SAndroid Build Coastguard Worker$if f$type(dchfile) .eqs. "STRING" 1870*6236dae4SAndroid Build Coastguard Worker$then 1871*6236dae4SAndroid Build Coastguard Worker$ if f$search(dchfile) .nes. "" then delete 'dchfile';* 1872*6236dae4SAndroid Build Coastguard Worker$endif 1873*6236dae4SAndroid Build Coastguard Worker$if f$type(starhfile) .eqs. "STRING" 1874*6236dae4SAndroid Build Coastguard Worker$then 1875*6236dae4SAndroid Build Coastguard Worker$ if f$search(starhfile) .nes. "" then delete 'starhfile';* 1876*6236dae4SAndroid Build Coastguard Worker$endif 1877*6236dae4SAndroid Build Coastguard Worker$if f$type(configure_script) .eqs. "STRING" 1878*6236dae4SAndroid Build Coastguard Worker$then 1879*6236dae4SAndroid Build Coastguard Worker$ if f$search(configure_script) .nes. "" then delete 'configure_script';* 1880*6236dae4SAndroid Build Coastguard Worker$endif 1881*6236dae4SAndroid Build Coastguard Worker$exit 'status' 1882*6236dae4SAndroid Build Coastguard Worker$! 1883*6236dae4SAndroid Build Coastguard Worker$! 1884*6236dae4SAndroid Build Coastguard Worker$control_y: 1885*6236dae4SAndroid Build Coastguard Worker$ status = ss_control_y 1886*6236dae4SAndroid Build Coastguard Worker$ goto all_exit 1887*6236dae4SAndroid Build Coastguard Worker$! 1888*6236dae4SAndroid Build Coastguard Worker$! 1889*6236dae4SAndroid Build Coastguard Worker$! 1890*6236dae4SAndroid Build Coastguard Worker$! Gosub to write a new config_vms.h 1891*6236dae4SAndroid Build Coastguard Worker$!----------------------------------- 1892*6236dae4SAndroid Build Coastguard Worker$write_config_vms: 1893*6236dae4SAndroid Build Coastguard Worker$outfile = "sys$disk:[]config_vms.h" 1894*6236dae4SAndroid Build Coastguard Worker$create 'outfile' 1895*6236dae4SAndroid Build Coastguard Worker$open/append tf 'outfile' 1896*6236dae4SAndroid Build Coastguard Worker$write tf "/* File: config_vms.h" 1897*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1898*6236dae4SAndroid Build Coastguard Worker$write tf "** This file contains the manual edits needed for porting" 1899*6236dae4SAndroid Build Coastguard Worker$!write tf "** the ''proj_name' package to OpenVMS. 1900*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1901*6236dae4SAndroid Build Coastguard Worker$write tf "** Edit this file as needed. The procedure that automatically" 1902*6236dae4SAndroid Build Coastguard Worker$write tf "** generated this header stub will not overwrite or make any" 1903*6236dae4SAndroid Build Coastguard Worker$write tf "** changes to this file." 1904*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1905*6236dae4SAndroid Build Coastguard Worker$write tf - 1906*6236dae4SAndroid Build Coastguard Worker "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'" 1907*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1908*6236dae4SAndroid Build Coastguard Worker$write tf - 1909*6236dae4SAndroid Build Coastguard Worker "**========================================================================*/" 1910*6236dae4SAndroid Build Coastguard Worker$write tf "" 1911*6236dae4SAndroid Build Coastguard Worker$close tf 1912*6236dae4SAndroid Build Coastguard Worker$return 1913*6236dae4SAndroid Build Coastguard Worker$! 1914*6236dae4SAndroid Build Coastguard Worker$! gosub to write out a documentation header for config.h 1915*6236dae4SAndroid Build Coastguard Worker$!---------------------------------------------------------------- 1916*6236dae4SAndroid Build Coastguard Worker$write_config_h_header: 1917*6236dae4SAndroid Build Coastguard Worker$outfile = "sys$disk:[]config.h" 1918*6236dae4SAndroid Build Coastguard Worker$create 'outfile' 1919*6236dae4SAndroid Build Coastguard Worker$open/append tf 'outfile' 1920*6236dae4SAndroid Build Coastguard Worker$write tf "#ifndef CONFIG_H" 1921*6236dae4SAndroid Build Coastguard Worker$write tf "#define CONFIG_H" 1922*6236dae4SAndroid Build Coastguard Worker$write tf "/* File: config.h" 1923*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1924*6236dae4SAndroid Build Coastguard Worker$write tf - 1925*6236dae4SAndroid Build Coastguard Worker "** This file contains the options needed for porting " 1926*6236dae4SAndroid Build Coastguard Worker$write tf "** the project on a VMS system." 1927*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1928*6236dae4SAndroid Build Coastguard Worker$write tf "** Try not to make any edits to this file, as it is" 1929*6236dae4SAndroid Build Coastguard Worker$write tf "** automagically generated." 1930*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1931*6236dae4SAndroid Build Coastguard Worker$write tf "** Manual edits should be made to the config_vms.h file." 1932*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1933*6236dae4SAndroid Build Coastguard Worker$write tf - 1934*6236dae4SAndroid Build Coastguard Worker "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'" 1935*6236dae4SAndroid Build Coastguard Worker$write tf "**" 1936*6236dae4SAndroid Build Coastguard Worker$write tf - 1937*6236dae4SAndroid Build Coastguard Worker "**========================================================================*/" 1938*6236dae4SAndroid Build Coastguard Worker$write tf "" 1939*6236dae4SAndroid Build Coastguard Worker$write tf "#if (__CRTL_VER >= 70200000) && !defined (__VAX)" 1940*6236dae4SAndroid Build Coastguard Worker$write tf "#define _LARGEFILE 1" 1941*6236dae4SAndroid Build Coastguard Worker$write tf "#endif" 1942*6236dae4SAndroid Build Coastguard Worker$write tf "" 1943*6236dae4SAndroid Build Coastguard Worker$write tf "#ifndef __VAX" 1944*6236dae4SAndroid Build Coastguard Worker$write tf "#ifdef __CRTL_VER" 1945*6236dae4SAndroid Build Coastguard Worker$write tf "#if __CRTL_VER >= 80200000" 1946*6236dae4SAndroid Build Coastguard Worker$write tf "#define _USE_STD_STAT 1" 1947*6236dae4SAndroid Build Coastguard Worker$write tf "#endif" 1948*6236dae4SAndroid Build Coastguard Worker$write tf "#endif" 1949*6236dae4SAndroid Build Coastguard Worker$write tf "#endif" 1950*6236dae4SAndroid Build Coastguard Worker$write tf "" 1951*6236dae4SAndroid Build Coastguard Worker$! 1952*6236dae4SAndroid Build Coastguard Worker$write tf " /* Allow compiler builtins */" 1953*6236dae4SAndroid Build Coastguard Worker$write tf "/*-------------------------*/" 1954*6236dae4SAndroid Build Coastguard Worker$write tf "#ifdef __DECC_VER" 1955*6236dae4SAndroid Build Coastguard Worker$write tf "#include <non_existent_dir:builtins.h>" 1956*6236dae4SAndroid Build Coastguard Worker$write tf "#endif" 1957*6236dae4SAndroid Build Coastguard Worker$! 1958*6236dae4SAndroid Build Coastguard Worker$write tf "" 1959*6236dae4SAndroid Build Coastguard Worker$return 1960*6236dae4SAndroid Build Coastguard Worker$! 1961*6236dae4SAndroid Build Coastguard Worker$! gosub to write out the tail for config.h and close it 1962*6236dae4SAndroid Build Coastguard Worker$!--------------------------------------------------------- 1963*6236dae4SAndroid Build Coastguard Worker$write_config_h_tail: 1964*6236dae4SAndroid Build Coastguard Worker$write tf "" 1965*6236dae4SAndroid Build Coastguard Worker$write tf " /* Include the hand customized settings */" 1966*6236dae4SAndroid Build Coastguard Worker$write tf "/*--------------------------------------*/" 1967*6236dae4SAndroid Build Coastguard Worker$write tf "#include ""config_vms.h""" 1968*6236dae4SAndroid Build Coastguard Worker$write tf "" 1969*6236dae4SAndroid Build Coastguard Worker$write tf "#endif /* CONFIG_H */" 1970*6236dae4SAndroid Build Coastguard Worker$close tf 1971*6236dae4SAndroid Build Coastguard Worker$return 1972*6236dae4SAndroid Build Coastguard Worker$! 1973