resync with mainline
[p5sagit/p5-mst-13.2.git] / vms / subconfigure.com
1 $! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
2 $!
3 $! Note for folks from other platforms changing things in here:
4 $!   Fancy changes (based on compiler capabilities or VMS version or
5 $!   whatever) are tricky, so go ahead and punt on those.
6 $!
7 $!   Simple changes, though (say, always setting something to 1, or undef,
8 $!   or something like that) are straightforward. Adding a new item for the
9 $!   ultimately created config.sh requires adding two lines to this file.
10 $!
11 $!   First, a line in the format:
12 $!     $ perl_foo = "bar"
13 $!   after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the
14 $!   variable name as it appears in config.sh.
15 $!
16 $!   Second, add a line in the format:
17 $!     $ WC "foo='" + perl_foo + "'"
18 $!   after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the
19 $!   quoting, as it can be tricky. 
20 $! 
21 $! This .COM file expects to be called by configure.com, and thus expects
22 $! a few symbols in the environment. Notably:
23 $!
24 $!  One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES"
25 $!  Dec_C_Version set to the Dec C version (defaults to 0 if not specified)
26 $!  Has_Socketshr set to "T" if using socketshr
27 $!  Has_Dec_C_Sockets set to "T" if using Dec C sockets
28 $!  Use_Threads set to "T" if they're using threads
29 $!  C_Compiler_Invoke is the command needed to invoke the C compiler
30 $!
31 $! Set Dec_C_Version to something
32 $ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
33 $ echo = "Write Sys$Output "
34 $ Dec_C_Version := "''Dec_C_Version'"
35 $ Dec_C_Version = Dec_C_Version + 0
36 $ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
37 $ perl_extensions := "''extensions'"
38 $ if f$length(Mcc) .eq. 0 then Mcc := "cc"
39 $ MCC = f$edit(mcc, "UPCASE")
40 $ IF Mcc.eqs."CC
41 $ THEN
42 $   C_Compiler_Replace := "CC="
43 $ ELSE
44 $   C_Compiler_Replace := "CC=CC=''Mcc'"
45 $ ENDIF
46 $ if "''Using_Dec_C'" .eqs. "Yes"
47 $ THEN
48 $   Checkcc := "''Mcc'/prefix=all"
49 $ ELSE
50 $   Checkcc := "''Mcc'"
51 $ ENDIF
52 $ cc_flags = ""
53 $ if use_multiplicity .eqs. "Y"
54 $ THEN
55 $   perl_usemultiplicity = "define"
56 $ ELSE
57 $   perl_usemultiplicity = "undef"
58 $ ENDIF
59 $! Some constant defaults.
60 $
61 $ hwname = f$getsyi("HW_NAME")
62 $ myname = myhostname
63 $ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
64 $!
65 $! ##ADD NEW CONSTANTS HERE##
66 $ perl_d_llseek="undef"
67 $ perl_d_madvise="undef"
68 $ perl_selectminbits=32
69 $ perl_d_msync="undef"
70 $ perl_d_mprotect="undef"
71 $ perl_d_munmap="undef"
72 $ perl_crosscompile="undef"
73 $ perl_multiarch="undef"
74 $ perl_d_mmap="undef"
75 $ perl_i_sysmman="undef"
76 $ perl_d_telldirproto="define"
77 $ perl_i_sysmount="undef"
78 $ perl_d_bincompat="undef"
79 $ perl_d_endspent="undef
80 $ perl_d_getspent="undef
81 $ perl_d_getspnam="undef
82 $ perl_d_setspent="undef
83 $ perl_d_fstatfs="undef"
84 $ perl_i_machcthreads="undef"
85 $ perl_i_pthread="define"
86 $ perl_d_fstatvfs="undef"
87 $ perl_usesocks="undef"
88 $ perl_d_vendorlib="undef"
89 $ perl_vendorlibexp=""
90 $ perl_d_statfsflags="undef"
91 $ perl_i_sysstatvfs="undef"
92 $ perl_i_mntent="undef"
93 $ perl_d_getmntent="undef"
94 $ perl_d_hasmntopt="undef"
95 $ perl_package="''package'"
96 $ perl_baserev = "''baserev'"
97 $ cc_defines=""
98 $ perl_installusrbinperl="undef"
99 $ perl_CONFIG="true"
100 $ perl_d_fseeko="undef"
101 $ perl_d_ftello="undef"
102 $ perl_d_readv="undef"
103 $ perl_d_writev="undef"
104 $ perl_i_machcthr="undef"
105 $ perl_i_netdb="undef"
106 $ perl_d_gnulibc="undef"
107 $ perl_cf_by="unknown"
108 $ perl_ccdlflags=""
109 $ perl_cccdlflags=""
110 $ perl_mab=""
111 $ perl_drand01 = "drand48()"
112 $ perl_randseedtype = "long int"
113 $ perl_seedfunc = "srand48"
114 $ perl_d_msg_ctrunc = "undef"
115 $ perl_d_msg_dontroute = "undef"
116 $ perl_d_msg_oob = "undef"
117 $ perl_d_msg_peek = "undef"
118 $ perl_d_msg_proxy = "undef"
119 $ perl_d_scm_rights = "undef"
120 $ perl_d_sendmsg = "undef"
121 $ perl_d_recvmsg = "undef"
122 $ perl_d_msghdr_s = "undef"
123 $ perl_d_cmsghdr_s = "undef"
124 $ IF use_64bit .eqs. "Y"
125 $ THEN
126 $   perl_use64bits = "define"
127 $ ELSE
128 $   perl_use64bits = "undef"
129 $ ENDIF
130 $ perl_d_drand48proto = "define"
131 $ perl_libpth="/sys$share /sys$library"
132 $ perl_ld="Link"
133 $ perl_lddlflags="/Share"
134 $ perl_ranlib=""
135 $ perl_ar=""
136 $ perl_eunicefix=":"
137 $ perl_hint="none"
138 $ perl_i_arpainet="undef"
139 $ perl_d_grpasswd="undef"
140 $ perl_d_setgrent="undef"
141 $ perl_d_getgrent="define"
142 $ perl_d_endgrent="define"
143 $ perl_d_pwpasswd="define"
144 $ perl_d_setpwent="define"
145 $ perl_d_getpwent="define"
146 $ perl_d_endpwent="define"
147 $ perl_d_phostname="undef"
148 $ perl_d_accessx="undef"
149 $ perl_d_eaccess="undef"
150 $ perl_ebcdic="undef"
151 $ perl_hintfile=""
152 $ perl_shrplib="define"
153 $ perl_usemymalloc=mymalloc
154 $ perl_usevfork="true"
155 $ perl_useposix="false"
156 $ perl_spitshell="write sys$output "
157 $ perl_dlsrc="dl_vms.c"
158 $ perl_man1ext="rno"
159 $ perl_man3ext="rno"
160 $ perl_prefix="perl_root"
161 $ perl_binexp="''perl_prefix':[000000]"
162 $ perl_builddir="''perl_prefix':[000000]"
163 $ perl_installbin="''perl_prefix':[000000]"
164 $ perl_installscript="''perl_prefix':[utils]"
165 $ perl_installman1dir="''perl_prefix':[man.man1]"
166 $ perl_installman3dir="''perl_prefix':[man.man3]"
167 $ perl_installprivlib="''perl_prefix':[lib]"
168 $ perl_installsitelib="''perl_prefix':[lib.site_perl]"
169 $ perl_path_sep="|"
170 $ perl_cc=Mcc
171 $ perl_d_sockpair="undef"
172 $ perl_i_neterrno="define"
173 $ perl_ldflags="/NoTrace/NoMap"
174 $ perl_d_lchown="undef"
175 $ perl_d_mknod="undef"
176 $ perl_d_union_semun="undef"
177 $ perl_d_semctl_semun="undef"
178 $ perl_d_semctl_semid_ds="undef"
179 $ IF (sharedperl.EQS."Y")
180 $ THEN
181 $ perl_obj_ext=".abj"
182 $ perl_so="axe"
183 $ perl_dlext="axe"
184 $ perl_exe_ext=".axe"
185 $ perl_lib_ext=".alb"
186 $ ELSE
187 $ perl_obj_ext=".obj"
188 $ perl_so="exe"
189 $ perl_dlext="exe"
190 $ perl_exe_ext=".exe"
191 $ perl_lib_ext=".olb"
192 $ENDIF
193 $ perl_dlobj="dl_vms''perl_obj_ext'"
194 $ perl_osname="VMS"
195 $ perl_d_archlib="define"
196 $ perl_d_bincompat3="undef"
197 $ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
198 $ perl_cppminus=" "
199 $ perl_d_castneg="define"
200 $ perl_castflags="0"
201 $ perl_d_chsize="undef"
202 $ perl_d_const="define"
203 $ perl_d_crypt="define"
204 $ perl_byteorder="1234"
205 $ perl_full_csh=" "
206 $ perl_d_csh="undef"
207 $ perl_d_dup2="define"
208 $ perl_d_fchmod="undef"
209 $ perl_d_fchown="undef"
210 $ perl_d_fcntl="undef"
211 $ perl_d_fgetpos="define"
212 $ perl_d_flexfnam="define"
213 $ perl_d_flock="undef"
214 $ perl_d_fsetpos="define"
215 $ perl_d_getgrps="undef"
216 $ perl_d_setgrps="undef"
217 $ perl_d_getprior="undef"
218 $ perl_d_killpg="undef"
219 $ perl_d_link="undef"
220 $ perl_d_lstat="undef"
221 $ perl_d_lockf="undef"
222 $ perl_d_memcmp="define"
223 $ perl_d_memcpy="define"
224 $ perl_d_memmove="define"
225 $ perl_d_memset="define"
226 $ perl_d_mkdir="define"
227 $ perl_d_msg="undef"
228 $ perl_d_open3="define"
229 $ perl_d_poll="undef"
230 $ perl_d_readdir="define"
231 $ perl_d_seekdir="define"
232 $ perl_d_telldir="define"
233 $ perl_d_rewinddir="define"
234 $ perl_d_rename="define"
235 $ perl_d_rmdir="define"
236 $ perl_d_sem="undef"
237 $ perl_d_setegid="undef"
238 $ perl_d_seteuid="undef"
239 $ perl_d_setprior="undef"
240 $ perl_d_setregid="undef"
241 $ perl_d_setresgid="undef"
242 $ perl_d_setreuid="undef"
243 $ perl_d_setresuid="undef"
244 $ perl_d_setrgid="undef"
245 $ perl_d_setruid="undef"
246 $ perl_d_setsid="undef"
247 $ perl_d_shm="undef"
248 $ perl_d_shmatprototype="undef"
249 $ perl_d_statblks="undef"
250 $ perl_stdio_ptr="((*fp)->_ptr)"
251 $ perl_stdio_cnt="((*fp)->_cnt)"
252 $ perl_stdio_base="((*fp)->_base)"
253 $ perl_stdio_bufsiz="((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)"
254 $ perl_d_strctcpy="define"
255 $ perl_d_strerror="define"
256 $ perl_d_syserrlst="undef"
257 $ perl_d_strerrm="strerror((e),vaxc$errno)"
258 $ perl_d_symlink="undef"
259 $ perl_d_syscall="undef"
260 $ perl_d_system="define"
261 $ perl_timetype="time_t"
262 $ perl_d_vfork="define"
263 $ perl_signal_t="void"
264 $ perl_d_volatile="define"
265 $ perl_d_vprintf="define"
266 $ perl_d_charvspr="undef"
267 $ perl_d_waitpid="define"
268 $ perl_i_dirent="undef"
269 $ perl_d_dirnamlen="define"
270 $ perl_direntrytype="struct dirent"
271 $ perl_i_fcntl="undef"
272 $ perl_i_grp="undef"
273 $ perl_i_limits="define"
274 $ perl_i_memory="undef"
275 $ perl_i_ndbm="undef"
276 $ perl_i_stdarg="define"
277 $ perl_i_pwd="undef"
278 $ perl_d_pwquota="undef"
279 $ perl_d_pwage="undef"
280 $ perl_d_pwchange="undef"
281 $ perl_d_pwclass="undef"
282 $ perl_d_pwexpire="undef"
283 $ perl_d_pwcomment="define"
284 $ perl_i_stddef="define"
285 $ perl_i_stdlib="define"
286 $ perl_i_string="define"
287 $ perl_i_sysdir="undef"
288 $ perl_i_sysfile="undef"
289 $ perl_i_sysioctl="undef"
290 $ perl_i_sysndir="undef"
291 $ perl_i_sysresrc="undef"
292 $ perl_i_sysselct="undef"
293 $ perl_i_dbm="undef"
294 $ perl_i_rpcsvcdbm="undef"
295 $ perl_i_sfio="undef"
296 $ perl_i_sysstat="define"
297 $ perl_i_systimes="undef"
298 $ perl_i_systypes="define"
299 $ perl_i_sysun="undef"
300 $ perl_i_syswait="undef"
301 $ perl_i_termio="undef"
302 $ perl_i_sgtty="undef"
303 $ perl_i_termios="undef"
304 $ perl_i_time="define"
305 $ perl_i_systime="undef"
306 $ perl_i_systimek="undef"
307 $! perl_i_unistd="undef"
308 $ perl_i_utime="undef"
309 $ perl_i_varargs="undef"
310 $ perl_i_vfork="undef"
311 $ perl_prototype="define"
312 $ perl_randbits="31"
313 $ perl_stdchar="char"
314 $ perl_d_unlink_all_versions="undef"
315 $ perl_full_sed="_NLA0:"
316 $ perl_bin="/''perl_prefix'/000000"
317 $ perl_binexp="''perl_prefix':[000000]"
318 $ perl_d_alarm="define"
319 $ perl_d_casti32="define"
320 $ perl_d_chown="define"
321 $ perl_d_chroot="undef"
322 $ perl_d_cuserid="define"
323 $ perl_d_dbl_dig="define"
324 $ perl_d_ldbl_dig="define"
325 $ perl_d_difftime="define"
326 $ perl_d_fork="undef"
327 $ perl_d_getlogin="define"
328 $ perl_d_getppid="undef"
329 $ perl_d_nice="define"
330 $ perl_d_pause="define"
331 $ perl_d_pipe="define"
332 $ perl_d_readlink="undef"
333 $ perl_d_setlinebuf="undef"
334 $ perl_d_strchr="define"
335 $ perl_d_strtod="define"
336 $ perl_d_strtol="define"
337 $ perl_d_strtoul="define"
338 $ perl_d_tcgetpgrp="undef"
339 $ perl_d_tcsetpgrp="undef"
340 $ perl_d_times="define"
341 $ perl_d_tzname="undef"
342 $ perl_d_umask="define"
343 $ perl_fpostype="fpos_t"
344 $ perl_i_dlfcn="undef"
345 $ perl_i_float="define"
346 $ perl_i_math="define"
347 $ perl_lseektype="int"
348 $ perl_i_values="undef"
349 $ perl_malloctype="void *"
350 $ perl_freetype="void"
351 $ if "''mymalloc'".eqs."Y"
352 $ THEN
353 $ perl_d_mymalloc="define"
354 $ ELSE
355 $ perl_d_mymalloc="undef"
356 $ENDIF
357 $ perl_sh="MCR"
358 $ perl_modetype="unsigned int"
359 $ perl_ssizetype="int"
360 $ perl_o_nonblock=" "
361 $ perl_eagain=" "
362 $ perl_rd_nodata=" "
363 $ perl_d_eofnblk="undef"
364 $ perl_d_oldarchlib="define"
365 $ perl_privlibexp="''perl_prefix':[lib]"
366 $ perl_privlib="''perl_prefix':[lib]"
367 $ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
368 $ perl_sitelib="''perl_prefix':[lib.site_perl]"
369 $ perl_sizetype="size_t"
370 $ perl_i_sysparam="undef"
371 $ perl_d_void_closedir="define"
372 $ perl_d_dlerror="undef"
373 $ perl_d_dlsymun="undef"
374 $ perl_d_suidsafe="undef"
375 $ perl_d_dosuid="undef"
376 $ perl_d_inetaton="undef"
377 $ perl_d_isascii="define"
378 $ perl_d_mkfifo="undef"
379 $ perl_d_safebcpy="undef"
380 $ perl_d_safemcpy="define"
381 $ perl_d_sanemcmp="define"
382 $ perl_d_setpgrp="undef"
383 $ perl_d_bsdsetpgrp="undef"
384 $ perl_d_bsdpgrp="undef"
385 $ perl_d_setpgid="undef"
386 $ perl_d_setpgrp2="undef"
387 $ perl_d_Gconvert="my_gconvert(x,n,t,b)"
388 $ perl_d_getpgid="undef"
389 $ perl_d_getpgrp="undef"
390 $ perl_d_bsdgetpgrp="undef"
391 $ perl_d_getpgrp2="undef"
392 $ perl_d_sfio="undef"
393 $ perl_usedl="define"
394 $ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'  !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
395 $ perl_db_hashtype=" "
396 $ perl_db_prefixtype=" "
397 $ perl_useperlio="undef"
398 $ perl_defvoidused="15"
399 $ perl_voidflags="15"
400 $ perl_d_eunice="undef"
401 $ perl_d_pwgecos="define"
402 $ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
403 $ THEN
404 $ perl_libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE"
405 $ ELSE
406 $ perl_libs=" "
407 $ ENDIF
408 $ IF ("''Using_Dec_C'".eqs."Yes")
409 $ THEN
410 $ perl_libc="(DECCRTL)"
411 $ ELSE
412 $ perl_libc=" "
413 $ ENDIF
414 $ perl_PATCHLEVEL="''patchlevel'"
415 $ perl_SUBVERSION="''subversion'"
416 $ perl_pager="most"
417 $!
418 $! Are we 64 bit?
419 $!
420 $ if (use_64bit .eqs. "Y")
421 $ THEN
422 $   perl_d_PRIfldbl = "define"
423 $   perl_d_PRIgldbl = "define"
424 $   perl_d_PRId64 = "define"
425 $   perl_d_PRIu64 = "define"
426 $   perl_d_PRIo64 = "define"
427 $   perl_d_PRIx64 = "define"
428 $   perl_sPRIfldbl = """Lf"""
429 $   perl_sPRIgldbl = """Lg"""
430 $   perl_sPRId64 = """Ld"""
431 $   perl_sPRIu64 = """Lu"""
432 $   perl_sPRIo64 = """Lo"""
433 $   perl_sPRIx64 = """Lx"""
434 $ ELSE
435 $   perl_d_PRIfldbl = "undef"
436 $   perl_d_PRIgldbl = "undef"
437 $   perl_d_PRId64 = "undef"
438 $   perl_d_PRIu64 = "undef"
439 $   perl_d_PRIo64 = "undef"
440 $   perl_d_PRIx64 = "undef"
441 $   perl_sPRIfldbl = ""
442 $   perl_sPRIgldbl = ""
443 $   perl_sPRId64 = ""
444 $   perl_sPRIu64 = ""
445 $   perl_sPRIo64 = ""
446 $   perl_sPRIx64 = ""
447 $ ENDIF
448 $!
449 $!
450 $! Now some that we build up
451 $!
452 $ LocalTime = f$time()
453 $ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + - 
454                 f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
455                 " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
456                 " " + f$cvtime(LocalTime,, "YEAR")
457 $ if f$getsyi("HW_MODEL").ge.1024
458 $ THEN
459 $ perl_arch="VMS_AXP"
460 $ perl_archname="VMS_AXP"
461 $ perl_alignbytes="8"
462 $ ELSE
463 $ perl_arch="VMS_VAX"
464 $ perl_archname="VMS_VAX"
465 $ perl_alignbytes="8"
466 $ ENDIF
467 $ if ("''Use_Threads'".eqs."T")
468 $ THEN
469 $ perl_arch = "''perl_arch'-thread"
470 $ perl_archname = "''perl_archname'-thread"
471 $ perl_d_old_pthread_create_joinable = "undef"
472 $ perl_old_pthread_create_joinable = " "
473 $ ELSE
474 $ perl_d_old_pthread_create_joinable = "undef"
475 $ perl_old_pthread_create_joinable = " "
476 $ ENDIF
477 $ perl_osvers=f$edit(osvers, "TRIM")
478 $ if (perl_subversion + 0).eq.0
479 $ THEN
480 $ LocalPerlVer = "5_" + Perl_PATCHLEVEL
481 $ ELSE
482 $ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
483 $ ENDIF
484 $!
485 $! Some that we need to invoke the compiler for
486 $ OS := "open/write SOURCECHAN []temp.c"
487 $ WS := "write SOURCECHAN"
488 $ CS := "close SOURCECHAN"
489 $ DS := "delete/nolog []temp.*;*"
490 $ Needs_Opt := "No"
491 $ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
492 $ THEN
493 $   open/write OPTCHAN []temp.opt
494 $   IF ("''using_gnu_c'".eqs."Yes")
495 $   THEN
496 $     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
497 $   endif
498 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
499 $   Close OPTCHAN
500 $   Needs_Opt := "Yes"
501 $ ENDIF
502 $!
503 $! Check for __STDC__
504 $!
505 $ OS
506 $ WS "#ifdef __DECC
507 $ WS "#include <stdlib.h>
508 $ WS "#endif
509 $ WS "#include <stdio.h>
510 $ WS "int main()
511 $ WS "{"
512 $ WS "#ifdef __STDC__
513 $ WS "printf(""42\n"");
514 $ WS "#else
515 $ WS "printf(""1\n"");
516 $ WS "#endif
517 $ WS "exit(0);
518 $ WS "}"
519 $ CS
520 $   DEFINE SYS$ERROR _NLA0:
521 $   DEFINE SYS$OUTPUT _NLA0:
522 $   ON ERROR THEN CONTINUE
523 $   ON WARNING THEN CONTINUE
524 $   'Checkcc' temp.c
525 $   If (Needs_Opt.eqs."Yes")
526 $   THEN
527 $     link temp.obj,temp.opt/opt
528 $   else
529 $     link temp.obj
530 $   endif
531 $   DEASSIGN SYS$OUTPUT
532 $   DEASSIGN SYS$ERROR
533 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
534 $   DEFINE SYS$ERROR TEMPOUT
535 $   DEFINE SYS$OUTPUT TEMPOUT
536 $   mcr []temp
537 $   CLOSE TEMPOUT
538 $   DEASSIGN SYS$OUTPUT
539 $   DEASSIGN SYS$ERROR
540 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
541 $   READ TEMPOUT line
542 $   CLOSE TEMPOUT
543
544 $ perl_cpp_stuff=line
545 $ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
546 $!
547 $! Check for double size
548 $!
549 $ OS
550 $ WS "#ifdef __DECC
551 $ WS "#include <stdlib.h>
552 $ WS "#endif
553 $ WS "#include <stdio.h>
554 $ WS "int main()
555 $ WS "{"
556 $ WS "int foo;
557 $ WS "foo = sizeof(double);
558 $ WS "printf(""%d\n"", foo);
559 $ WS "exit(0);
560 $ WS "}"
561 $ CS
562 $   DEFINE SYS$ERROR _NLA0:
563 $   DEFINE SYS$OUTPUT _NLA0:
564 $   ON ERROR THEN CONTINUE
565 $   ON WARNING THEN CONTINUE
566 $   'Checkcc' temp.c
567 $   If (Needs_Opt.eqs."Yes")
568 $   THEN
569 $     link temp.obj,temp.opt/opt
570 $   else
571 $     link temp.obj
572 $   endif
573 $!   link temp.obj
574 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
575 $   DEASSIGN SYS$OUTPUT
576 $   DEASSIGN SYS$ERROR
577 $   DEFINE SYS$ERROR TEMPOUT
578 $   DEFINE SYS$OUTPUT TEMPOUT
579 $   mcr []temp
580 $   CLOSE TEMPOUT
581 $   DEASSIGN SYS$OUTPUT
582 $   DEASSIGN SYS$ERROR
583 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
584 $   READ TEMPOUT line
585 $   CLOSE TEMPOUT
586
587 $ perl_doublesize=line
588 $ WRITE_RESULT "doublesize is ''perl_doublesize'"
589 $!
590 $! Check for long double size
591 $!
592 $ OS
593 $ WS "#ifdef __DECC
594 $ WS "#include <stdlib.h>
595 $ WS "#endif
596 $ WS "#include <stdio.h>
597 $ WS "int main()
598 $ WS "{"
599 $ WS "printf(""%d\n"", sizeof(long double));
600 $ WS "exit(0);
601 $ WS "}"
602 $ CS
603 $   DEFINE SYS$ERROR _NLA0:
604 $   DEFINE SYS$OUTPUT _NLA0:
605 $   ON ERROR THEN CONTINUE
606 $   ON WARNING THEN CONTINUE
607 $   'Checkcc' temp.c
608 $   teststatus = f$extract(9,1,$status)
609 $   if (teststatus.nes."1")
610 $   THEN
611 $     perl_longdblsize="0"
612 $     perl_d_longdbl="undef"
613 $   ELSE
614 $     ON ERROR THEN CONTINUE
615 $     ON WARNING THEN CONTINUE
616 $     If (Needs_Opt.eqs."Yes")
617 $     THEN
618 $     link temp.obj,temp.opt/opt
619 $     else
620 $       link temp.obj
621 $     endif
622 $     teststatus = f$extract(9,1,$status)
623 $     DEASSIGN SYS$OUTPUT
624 $     DEASSIGN SYS$ERROR
625 $     if (teststatus.nes."1")
626 $     THEN
627 $       perl_longdblsize="0"
628 $       perl_d_longdbl="undef"
629 $     ELSE
630 $       OPEN/WRITE TEMPOUT [-.uu]tempout.lis
631 $       DEFINE SYS$ERROR TEMPOUT
632 $       DEFINE SYS$OUTPUT TEMPOUT
633 $       mcr []temp
634 $       CLOSE TEMPOUT
635 $       DEASSIGN SYS$OUTPUT
636 $       DEASSIGN SYS$ERROR
637 $       OPEN/READ TEMPOUT [-.uu]tempout.lis
638 $       READ TEMPOUT line
639 $       CLOSE TEMPOUT
640
641 $       perl_longdblsize=line
642 $       perl_d_longdbl="define"
643 $     ENDIF
644 $   ENDIF
645 $ WRITE_RESULT "longdblsize is ''perl_longdblsize'"
646 $ WRITE_RESULT "d_longdbl is ''perl_d_longdbl'"
647 $!
648 $! Check for long long existance and size
649 $!
650 $ OS
651 $ WS "#ifdef __DECC
652 $ WS "#include <stdlib.h>
653 $ WS "#endif
654 $ WS "#include <stdio.h>
655 $ WS "int main()
656 $ WS "{"
657 $ WS "printf(""%d\n"", sizeof(long long));
658 $ WS "exit(0);
659 $ WS "}"
660 $ CS
661 $   DEFINE SYS$ERROR _NLA0:
662 $   DEFINE SYS$OUTPUT _NLA0:
663 $   on error then continue
664 $   on warning then continue
665 $   'Checkcc' temp.c
666 $   If (Needs_Opt.eqs."Yes")
667 $   THEN
668 $     link temp.obj,temp.opt/opt
669 $   else
670 $     link temp.obj
671 $   endif
672 $   teststatus = f$extract(9,1,$status)
673 $   DEASSIGN SYS$OUTPUT
674 $   DEASSIGN SYS$ERROR
675 $   if (teststatus.nes."1")
676 $   THEN
677 $     perl_longlongsize="0"
678 $     perl_d_longlong="undef"
679 $   ELSE
680 $     OPEN/WRITE TEMPOUT [-.uu]tempout.lis
681 $     DEFINE SYS$ERROR TEMPOUT
682 $     DEFINE SYS$OUTPUT TEMPOUT
683 $     mcr []temp
684 $     CLOSE TEMPOUT
685 $     DEASSIGN SYS$OUTPUT
686 $     DEASSIGN SYS$ERROR
687 $     OPEN/READ TEMPOUT [-.uu]tempout.lis
688 $     READ TEMPOUT line
689 $     CLOSE TEMPOUT
690
691 $     perl_longlongsize=line
692 $     perl_d_longlong="define"
693 $   ENDIF
694 $ WRITE_RESULT "longlongsize is ''perl_longlongsize'"
695 $ WRITE_RESULT "d_longlong is ''perl_d_longlong'"
696 $!
697 $! Check for int size
698 $!
699 $ OS
700 $ WS "#ifdef __DECC
701 $ WS "#include <stdlib.h>
702 $ WS "#endif
703 $ WS "#include <stdio.h>
704 $ WS "int main()
705 $ WS "{"
706 $ WS "printf(""%d\n"", sizeof(int));
707 $ WS "exit(0);
708 $ WS "}"
709 $ CS
710 $   DEFINE SYS$ERROR _NLA0:
711 $   DEFINE SYS$OUTPUT _NLA0:
712 $   on error then continue
713 $   on warning then continue
714 $   'Checkcc' temp.c
715 $   If (Needs_Opt.eqs."Yes")
716 $   THEN
717 $     link temp.obj,temp.opt/opt
718 $   else
719 $     link temp.obj
720 $   endif
721 $   If (Needs_Opt.eqs."Yes")
722 $   THEN
723 $     link temp.obj,temp.opt/opt
724 $   else
725 $     link temp.obj
726 $   endif
727 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
728 $   DEASSIGN SYS$OUTPUT
729 $   DEASSIGN SYS$ERROR
730 $   DEFINE SYS$ERROR TEMPOUT
731 $   DEFINE SYS$OUTPUT TEMPOUT
732 $   mcr []temp
733 $   CLOSE TEMPOUT
734 $   DEASSIGN SYS$OUTPUT
735 $   DEASSIGN SYS$ERROR
736 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
737 $   READ TEMPOUT line
738 $   CLOSE TEMPOUT
739
740 $   perl_intsize=line
741 $ WRITE_RESULT "intsize is ''perl_intsize'"
742 $!
743 $! Check for short size
744 $!
745 $ OS
746 $ WS "#ifdef __DECC
747 $ WS "#include <stdlib.h>
748 $ WS "#endif
749 $ WS "#include <stdio.h>
750 $ WS "int main()
751 $ WS "{"
752 $ WS "printf(""%d\n"", sizeof(short));
753 $ WS "exit(0);
754 $ WS "}"
755 $ CS
756 $   DEFINE SYS$ERROR _NLA0:
757 $   DEFINE SYS$OUTPUT _NLA0:
758 $   on error then continue
759 $   on warning then continue
760 $   'Checkcc' temp.c
761 $   If (Needs_Opt.eqs."Yes")
762 $   THEN
763 $     link temp.obj,temp.opt/opt
764 $   else
765 $     link temp.obj
766 $   endif
767 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
768 $   DEASSIGN SYS$OUTPUT
769 $   DEASSIGN SYS$ERROR
770 $   DEFINE SYS$ERROR TEMPOUT
771 $   DEFINE SYS$OUTPUT TEMPOUT
772 $   mcr []temp
773 $   CLOSE TEMPOUT
774 $   DEASSIGN SYS$OUTPUT
775 $   DEASSIGN SYS$ERROR
776 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
777 $   READ TEMPOUT line
778 $   CLOSE TEMPOUT
779
780 $   perl_shortsize=line
781 $ WRITE_RESULT "shortsize is ''perl_shortsize'"
782 $!
783 $! Check for long size
784 $!
785 $ OS
786 $ WS "#ifdef __DECC
787 $ WS "#include <stdlib.h>
788 $ WS "#endif
789 $ WS "#include <stdio.h>
790 $ WS "int main()
791 $ WS "{"
792 $ WS "int foo;
793 $ WS "foo = sizeof(long);
794 $ WS "printf(""%d\n"", foo);
795 $ WS "exit(0);
796 $ WS "}"
797 $ CS
798 $   DEFINE SYS$ERROR _NLA0:
799 $   DEFINE SYS$OUTPUT _NLA0:
800 $   on error then continue
801 $   on warning then continue
802 $   'Checkcc' temp.c
803 $   If (Needs_Opt.eqs."Yes")
804 $   THEN
805 $     link temp.obj,temp.opt/opt
806 $   else
807 $     link temp.obj
808 $   endif
809 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
810 $   DEASSIGN SYS$OUTPUT
811 $   DEASSIGN SYS$ERROR
812 $   DEFINE SYS$ERROR TEMPOUT
813 $   DEFINE SYS$OUTPUT TEMPOUT
814 $   mcr []temp
815 $   CLOSE TEMPOUT
816 $   DEASSIGN SYS$OUTPUT
817 $   DEASSIGN SYS$ERROR
818 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
819 $   READ TEMPOUT line
820 $   CLOSE TEMPOUT
821
822 $   perl_longsize=line
823 $ WRITE_RESULT "longsize is ''perl_longsize'"
824 $!
825 $! Check the prototype for getgid
826 $!
827 $ OS
828 $ WS "#ifdef __DECC
829 $ WS "#include <stdlib.h>
830 $ WS "#endif
831 $ WS "#include <stdio.h>
832 $ WS "#include <types.h>
833 $ WS "#include <unistd.h>
834 $ WS "int main()
835 $ WS "{"
836 $ WS "gid_t foo;
837 $ WS "exit(0);
838 $ WS "}"
839 $ CS
840 $   DEFINE SYS$ERROR _NLA0:
841 $   DEFINE SYS$OUTPUT _NLA0:
842 $   on error then continue
843 $   on warning then continue
844 $   'Checkcc' temp.c
845 $   teststatus = f$extract(9,1,$status)
846 $   DEASSIGN SYS$OUTPUT
847 $   DEASSIGN SYS$ERROR
848 $   if (teststatus.nes."1")
849 $   THEN
850 $!   Okay, gid_t failed. Must be unsigned int
851 $     perl_gidtype = "unsigned int"
852 $   ELSE
853 $     perl_gidtype = "gid_t"
854 $   ENDIF
855 $ WRITE_RESULT "Gid_t is ''perl_gidtype'"
856 $!
857 $! Check to see if we've got dev_t
858 $!
859 $ OS
860 $ WS "#ifdef __DECC
861 $ WS "#include <stdlib.h>
862 $ WS "#endif
863 $ WS "#include <stdio.h>
864 $ WS "#include <types.h>
865 $ WS "#include <unistd.h>
866 $ WS "int main()
867 $ WS "{"
868 $ WS "dev_t foo;
869 $ WS "exit(0);
870 $ WS "}"
871 $ CS
872 $   DEFINE SYS$ERROR _NLA0:
873 $   DEFINE SYS$OUTPUT _NLA0:
874 $   on error then continue
875 $   on warning then continue
876 $   'Checkcc' temp.c
877 $   teststatus = f$extract(9,1,$status)
878 $   DEASSIGN SYS$OUTPUT
879 $   DEASSIGN SYS$ERROR
880 $   if (teststatus.nes."1")
881 $   THEN
882 $!   Okay, dev_t failed. Must be unsigned int
883 $     perl_devtype = "unsigned int"
884 $   ELSE
885 $     perl_devtype = "dev_t"
886 $   ENDIF
887 $ WRITE_RESULT "Dev_t is ''perl_devtype'"
888 $!
889 $! Check to see if we've got unistd.h (which we ought to, but you never know)
890 $!
891 $ OS
892 $ WS "#ifdef __DECC
893 $ WS "#include <stdlib.h>
894 $ WS "#endif
895 $ WS "#include <unistd.h>
896 $ WS "int main()
897 $ WS "{"
898 $ WS "exit(0);
899 $ WS "}"
900 $ CS
901 $   DEFINE SYS$ERROR _NLA0:
902 $   DEFINE SYS$OUTPUT _NLA0:
903 $   on error then continue
904 $   on warning then continue
905 $   'Checkcc' temp.c
906 $   teststatus = f$extract(9,1,$status)
907 $   DEASSIGN SYS$OUTPUT
908 $   DEASSIGN SYS$ERROR
909 $   if (teststatus.nes."1")
910 $   THEN
911 $!   Okay, failed. Must not have it
912 $     perl_i_unistd = "undef"
913 $   ELSE
914 $     perl_i_unistd = "define"
915
916 $   ENDIF
917 $ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
918 $!
919 $! Check to see if we've got shadow.h (probably not, but...)
920 $!
921 $ OS
922 $ WS "#ifdef __DECC
923 $ WS "#include <stdlib.h>
924 $ WS "#endif
925 $ WS "#include <shadow.h>
926 $ WS "int main()
927 $ WS "{"
928 $ WS "exit(0);
929 $ WS "}"
930 $ CS
931 $   DEFINE SYS$ERROR _NLA0:
932 $   DEFINE SYS$OUTPUT _NLA0:
933 $   on error then continue
934 $   on warning then continue
935 $   'Checkcc' temp.c
936 $   teststatus = f$extract(9,1,$status)
937 $   DEASSIGN SYS$OUTPUT
938 $   DEASSIGN SYS$ERROR
939 $   if (teststatus.nes."1")
940 $   THEN
941 $!   Okay, failed. Must not have it
942 $     perl_i_shadow = "undef"
943 $   ELSE
944 $     perl_i_shadow = "define"
945
946 $   ENDIF
947 $ WRITE_RESULT "i_shadow is ''perl_i_shadow'"
948 $!
949 $! Check to see if we've got socks.h (probably not, but...)
950 $!
951 $ OS
952 $ WS "#ifdef __DECC
953 $ WS "#include <stdlib.h>
954 $ WS "#endif
955 $ WS "#include <socks.h>
956 $ WS "int main()
957 $ WS "{"
958 $ WS "exit(0);
959 $ WS "}"
960 $ CS
961 $   DEFINE SYS$ERROR _NLA0:
962 $   DEFINE SYS$OUTPUT _NLA0:
963 $   on error then continue
964 $   on warning then continue
965 $   'Checkcc' temp.c
966 $   teststatus = f$extract(9,1,$status)
967 $   DEASSIGN SYS$OUTPUT
968 $   DEASSIGN SYS$ERROR
969 $   if (teststatus.nes."1")
970 $   THEN
971 $!   Okay, failed. Must not have it
972 $     perl_i_socks = "undef"
973 $   ELSE
974 $     perl_i_socks = "define"
975
976 $   ENDIF
977 $ WRITE_RESULT "i_socks is ''perl_i_socks'"
978 $!
979 $! Check the prototype for select
980 $!
981 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
982 $ THEN
983 $ OS
984 $ WS "#ifdef __DECC
985 $ WS "#include <stdlib.h>
986 $ WS "#endif
987 $ WS "#include <stdio.h>
988 $ WS "#include <types.h>
989 $ WS "#include <unistd.h>
990 $ if ("''Has_Socketshr'".eqs."T")
991 $ THEN
992 $  WS "#include <socketshr.h>"
993 $ else
994 $  WS "#include <time.h>
995 $  WS "#include <socket.h>
996 $ endif
997 $ WS "int main()
998 $ WS "{"
999 $ WS "fd_set *foo;
1000 $ WS "int bar;
1001 $ WS "foo = NULL;
1002 $ WS "bar = select(2, foo, foo, foo, NULL);
1003 $ WS "exit(0);
1004 $ WS "}"
1005 $ CS
1006 $   DEFINE SYS$ERROR _NLA0:
1007 $   DEFINE SYS$OUTPUT _NLA0:
1008 $   on error then continue
1009 $   on warning then continue
1010 $   'Checkcc' temp.c
1011 $   teststatus = f$extract(9,1,$status)
1012 $   DEASSIGN SYS$OUTPUT
1013 $   DEASSIGN SYS$ERROR
1014 $   if (teststatus.nes."1")
1015 $   THEN
1016 $!   Okay, fd_set failed. Must be an int
1017 $     perl_selecttype = "int *"
1018 $   ELSE
1019 $     perl_selecttype="fd_set *"
1020 $   ENDIF
1021 $ ELSE
1022 $   ! No sockets, so stick in an int *
1023 $   perl_selecttype = "int *"
1024 $ ENDIF
1025 $ WRITE_RESULT "selectype is ''perl_selecttype'"
1026 $!
1027 $! Check to see if fd_set exists
1028 $!
1029 $ OS
1030 $ WS "#ifdef __DECC
1031 $ WS "#include <stdlib.h>
1032 $ WS "#endif
1033 $ WS "#include <stdio.h>
1034 $ WS "#include <types.h>
1035 $ WS "#include <unistd.h>
1036 $ if ("''Has_Socketshr'".eqs."T")
1037 $ THEN
1038 $  WS "#include <socketshr.h>"
1039 $ ENDIF
1040 $ IF ("''Has_Dec_C_Sockets'".eqs."T")
1041 $ THEN
1042 $  WS "#include <time.h>
1043 $  WS "#include <socket.h>
1044 $ endif
1045 $ WS "int main()
1046 $ WS "{"
1047 $ WS "fd_set *foo;
1048 $ WS "int bar;
1049 $ WS "exit(0);
1050 $ WS "}"
1051 $ CS
1052 $ DEFINE SYS$ERROR _NLA0:
1053 $ DEFINE SYS$OUTPUT _NLA0:
1054 $ on error then continue
1055 $ on warning then continue
1056 $ 'Checkcc' temp.c
1057 $ teststatus = f$extract(9,1,$status)
1058 $ DEASSIGN SYS$OUTPUT
1059 $ DEASSIGN SYS$ERROR
1060 $ if (teststatus.nes."1")
1061 $ THEN
1062 $!  Okay, fd_set failed. Must not exist
1063 $   perl_d_fd_set = "undef"
1064 $ ELSE
1065 $   perl_d_fd_set="define"
1066 $ ENDIF
1067 $ WRITE_RESULT "d_fd_set is ''perl_d_fd_set'"
1068 $!
1069 $! Check for inttypes.h
1070 $!
1071 $ OS
1072 $ WS "#ifdef __DECC
1073 $ WS "#include <stdlib.h>
1074 $ WS "#endif
1075 $ WS "#include <stdio.h>
1076 $ WS "#include <unistd.h>
1077 $ WS "#include <inttypes.h>
1078 $ WS "int main()
1079 $ WS "{"
1080 $ WS "exit(0);
1081 $ WS "}"
1082 $ CS
1083 $   DEFINE SYS$ERROR _NLA0:
1084 $   DEFINE SYS$OUTPUT _NLA0:
1085 $   on error then continue
1086 $   on warning then continue
1087 $   'Checkcc' temp.c
1088 $   savedstatus = $status
1089 $   teststatus = f$extract(9,1,savedstatus)
1090 $   if (teststatus.nes."1")
1091 $   THEN
1092 $     perl_i_inttypes="undef"
1093 $     DEASSIGN SYS$OUTPUT
1094 $     DEASSIGN SYS$ERROR
1095 $   ELSE
1096 $     If (Needs_Opt.eqs."Yes")
1097 $     THEN
1098 $       link temp.obj,temp.opt/opt
1099 $     else
1100 $       link temp.obj
1101 $     endif
1102 $     savedstatus = $status
1103 $     teststatus = f$extract(9,1,savedstatus)
1104 $     DEASSIGN SYS$OUTPUT
1105 $     DEASSIGN SYS$ERROR
1106 $     if (teststatus.nes."1")
1107 $     THEN
1108 $       perl_i_inttypes="undef"
1109 $     ELSE
1110 $       perl_i_inttypes="define"
1111 $     ENDIF
1112 $   ENDIF
1113 $ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'"
1114 $!
1115 $! Check to see if int64_t exists
1116 $!
1117 $ OS
1118 $ WS "#ifdef __DECC
1119 $ WS "#include <stdlib.h>
1120 $ WS "#endif
1121 $ WS "#include <stdio.h>
1122 $ WS "#include <types.h>
1123 $ WS "#''perl_i_inttypes IIH
1124 $ WS "#ifdef IIH
1125 $ WS "#include <inttypes.h>
1126 $ WS "#endif
1127 $ WS "#include <unistd.h>
1128 $ WS "int main()
1129 $ WS "{"
1130 $ WS "int64_t bar;
1131 $ WS "exit(0);
1132 $ WS "}"
1133 $ CS
1134 $ DEFINE SYS$ERROR _NLA0:
1135 $ DEFINE SYS$OUTPUT _NLA0:
1136 $ on error then continue
1137 $ on warning then continue
1138 $ 'Checkcc' temp.c
1139 $ teststatus = f$extract(9,1,$status)
1140 $ DEASSIGN SYS$OUTPUT
1141 $ DEASSIGN SYS$ERROR
1142 $ if (teststatus.nes."1")
1143 $ THEN
1144 $!  Okay, int64_t failed. Must not exist
1145 $   perl_d_int64t = "undef"
1146 $ ELSE
1147 $   perl_d_int64t="define"
1148 $ ENDIF
1149 $ WRITE_RESULT "d_int64t is ''perl_d_int64t'"
1150 $!
1151 $! Check to see if off64_t exists
1152 $!
1153 $ OS
1154 $ WS "#ifdef __DECC
1155 $ WS "#include <stdlib.h>
1156 $ WS "#endif
1157 $ WS "#include <stdio.h>
1158 $ WS "#include <types.h>
1159 $ WS "#''perl_i_inttypes IIH
1160 $ WS "#ifdef IIH
1161 $ WS "#include <inttypes.h>
1162 $ WS "#endif
1163 $ WS "#include <unistd.h>
1164 $ WS "int main()
1165 $ WS "{"
1166 $ WS "off64_t bar;
1167 $ WS "exit(0);
1168 $ WS "}"
1169 $ CS
1170 $ DEFINE SYS$ERROR _NLA0:
1171 $ DEFINE SYS$OUTPUT _NLA0:
1172 $ on error then continue
1173 $ on warning then continue
1174 $ 'Checkcc' temp.c
1175 $ teststatus = f$extract(9,1,$status)
1176 $ DEASSIGN SYS$OUTPUT
1177 $ DEASSIGN SYS$ERROR
1178 $ if (teststatus.nes."1")
1179 $ THEN
1180 $!  Okay, off64_t failed. Must not exist
1181 $   perl_d_off64_t = "undef"
1182 $ ELSE
1183 $   perl_d_off64_t="define"
1184 $ ENDIF
1185 $ WRITE_RESULT "d_off64_t is ''perl_d_off64_t'"
1186 $!
1187 $! Check to see if fpos64_t exists
1188 $!
1189 $ OS
1190 $ WS "#ifdef __DECC
1191 $ WS "#include <stdlib.h>
1192 $ WS "#endif
1193 $ WS "#include <stdio.h>
1194 $ WS "#include <types.h>
1195 $ WS "#''perl_i_inttypes IIH
1196 $ WS "#ifdef IIH
1197 $ WS "#include <inttypes.h>
1198 $ WS "#endif
1199 $ WS "#include <unistd.h>
1200 $ WS "int main()
1201 $ WS "{"
1202 $ WS "fpos64_t bar;
1203 $ WS "exit(0);
1204 $ WS "}"
1205 $ CS
1206 $ DEFINE SYS$ERROR _NLA0:
1207 $ DEFINE SYS$OUTPUT _NLA0:
1208 $ on error then continue
1209 $ on warning then continue
1210 $ 'Checkcc' temp.c
1211 $ teststatus = f$extract(9,1,$status)
1212 $ DEASSIGN SYS$OUTPUT
1213 $ DEASSIGN SYS$ERROR
1214 $ if (teststatus.nes."1")
1215 $ THEN
1216 $!  Okay, fpos64_t failed. Must not exist
1217 $   perl_d_fpos64_t = "undef"
1218 $ ELSE
1219 $   perl_d_fpos64_t="define"
1220 $ ENDIF
1221 $ WRITE_RESULT "d_fpos64_t is ''perl_d_fpos64_t'"
1222 $!
1223 $! Check to see if gethostname exists
1224 $!
1225 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1226 $ THEN
1227 $ OS
1228 $ WS "#ifdef __DECC
1229 $ WS "#include <stdlib.h>
1230 $ WS "#endif
1231 $ WS "#include <stdio.h>
1232 $ WS "#include <types.h>
1233 $ WS "#include <unistd.h>
1234 $ if ("''Has_Socketshr'".eqs."T")
1235 $ THEN
1236 $  WS "#include <socketshr.h>"
1237 $ else
1238 $  WS "#include <time.h>
1239 $  WS "#include <socket.h>
1240 $ endif
1241 $ WS "int main()
1242 $ WS "{"
1243 $ WS "char name[100];
1244 $ WS "int bar, baz;
1245 $ WS "bar = 100;
1246 $ WS "baz = gethostname(name, bar);
1247 $ WS "exit(0);
1248 $ WS "}"
1249 $ CS
1250 $   DEFINE SYS$ERROR _NLA0:
1251 $   DEFINE SYS$OUTPUT _NLA0:
1252 $   on error then continue
1253 $   on warning then continue
1254 $   'Checkcc' temp.c
1255 $   teststatus = f$extract(9,1,$status)
1256 $   DEASSIGN SYS$OUTPUT
1257 $   DEASSIGN SYS$ERROR
1258 $   if (teststatus.nes."1")
1259 $   THEN
1260 $!   Okay, compile failed. Must not have it
1261 $     perl_dgethname = "undef"
1262 $   ELSE
1263 $     If (Needs_Opt.eqs."Yes")
1264 $     THEN
1265 $       link temp.obj,temp.opt/opt
1266 $     else
1267 $       link temp.obj
1268 $     endif
1269 $     savedstatus = $status
1270 $     teststatus = f$extract(9,1,savedstatus)
1271 $     if (teststatus.nes."1")
1272 $     THEN
1273 $       perl_d_gethname="undef"
1274 $     ELSE
1275 $       perl_d_gethname="define"
1276 $     ENDIF
1277 $   ENDIF
1278 $ ELSE
1279 $   ! No sockets, so no gethname
1280 $   perl_d_gethname = "undef"
1281 $ ENDIF
1282 $ WRITE_RESULT "d_gethname is ''perl_d_gethname'"
1283 $!
1284 $! Check for sys/file.h
1285 $!
1286 $ OS
1287 $ WS "#ifdef __DECC
1288 $ WS "#include <stdlib.h>
1289 $ WS "#endif
1290 $ WS "#include <stdio.h>
1291 $ WS "#include <unistd.h>
1292 $ WS "#include <sys/file.h>
1293 $ WS "int main()
1294 $ WS "{"
1295 $ WS "exit(0);
1296 $ WS "}"
1297 $ CS
1298 $   DEFINE SYS$ERROR _NLA0:
1299 $   DEFINE SYS$OUTPUT _NLA0:
1300 $   on error then continue
1301 $   on warning then continue
1302 $   'Checkcc' temp.c
1303 $   savedstatus = $status
1304 $   teststatus = f$extract(9,1,savedstatus)
1305 $   if (teststatus.nes."1")
1306 $   THEN
1307 $     perl_i_sysfile="undef"
1308 $     DEASSIGN SYS$OUTPUT
1309 $     DEASSIGN SYS$ERROR
1310 $   ELSE
1311 $     If (Needs_Opt.eqs."Yes")
1312 $     THEN
1313 $       link temp.obj,temp.opt/opt
1314 $     else
1315 $       link temp.obj
1316 $     endif
1317 $     savedstatus = $status
1318 $     teststatus = f$extract(9,1,savedstatus)
1319 $     DEASSIGN SYS$OUTPUT
1320 $     DEASSIGN SYS$ERROR
1321 $     if (teststatus.nes."1")
1322 $     THEN
1323 $       perl_i_sysfile="undef"
1324 $     ELSE
1325 $       perl_i_sysfile="define"
1326 $     ENDIF
1327 $   ENDIF
1328 $ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
1329 $!
1330 $! Check for poll.h
1331 $!
1332 $ OS
1333 $ WS "#ifdef __DECC
1334 $ WS "#include <stdlib.h>
1335 $ WS "#endif
1336 $ WS "#include <stdio.h>
1337 $ WS "#include <unistd.h>
1338 $ WS "#include <poll.h>
1339 $ WS "int main()
1340 $ WS "{"
1341 $ WS "exit(0);
1342 $ WS "}"
1343 $ CS
1344 $   DEFINE SYS$ERROR _NLA0:
1345 $   DEFINE SYS$OUTPUT _NLA0:
1346 $   on error then continue
1347 $   on warning then continue
1348 $   'Checkcc' temp.c
1349 $   savedstatus = $status
1350 $   teststatus = f$extract(9,1,savedstatus)
1351 $   if (teststatus.nes."1")
1352 $   THEN
1353 $     perl_i_poll="undef"
1354 $     DEASSIGN SYS$OUTPUT
1355 $     DEASSIGN SYS$ERROR
1356 $   ELSE
1357 $     If (Needs_Opt.eqs."Yes")
1358 $     THEN
1359 $       link temp.obj,temp.opt/opt
1360 $     else
1361 $       link temp.obj
1362 $     endif
1363 $     savedstatus = $status
1364 $     teststatus = f$extract(9,1,savedstatus)
1365 $     DEASSIGN SYS$OUTPUT
1366 $     DEASSIGN SYS$ERROR
1367 $     if (teststatus.nes."1")
1368 $     THEN
1369 $       perl_i_poll="undef"
1370 $     ELSE
1371 $       perl_i_poll="define"
1372 $     ENDIF
1373 $   ENDIF
1374 $ WRITE_RESULT "i_poll is ''perl_i_poll'"
1375 $!
1376 $! Check for sys/uio.h
1377 $!
1378 $ OS
1379 $ WS "#ifdef __DECC
1380 $ WS "#include <stdlib.h>
1381 $ WS "#endif
1382 $ WS "#include <stdio.h>
1383 $ WS "#include <unistd.h>
1384 $ WS "#include <sys/uio.h>
1385 $ WS "int main()
1386 $ WS "{"
1387 $ WS "exit(0);
1388 $ WS "}"
1389 $ CS
1390 $   DEFINE SYS$ERROR _NLA0:
1391 $   DEFINE SYS$OUTPUT _NLA0:
1392 $   on error then continue
1393 $   on warning then continue
1394 $   'Checkcc' temp.c
1395 $   savedstatus = $status
1396 $   teststatus = f$extract(9,1,savedstatus)
1397 $   if (teststatus.nes."1")
1398 $   THEN
1399 $     perl_i_sysuio="undef"
1400 $     DEASSIGN SYS$OUTPUT
1401 $     DEASSIGN SYS$ERROR
1402 $   ELSE
1403 $     If (Needs_Opt.eqs."Yes")
1404 $     THEN
1405 $       link temp.obj,temp.opt/opt
1406 $     else
1407 $       link temp.obj
1408 $     endif
1409 $     savedstatus = $status
1410 $     teststatus = f$extract(9,1,savedstatus)
1411 $     DEASSIGN SYS$OUTPUT
1412 $     DEASSIGN SYS$ERROR
1413 $     if (teststatus.nes."1")
1414 $     THEN
1415 $       perl_i_sysuio="undef"
1416 $     ELSE
1417 $       perl_i_sysuio="define"
1418 $     ENDIF
1419 $   ENDIF
1420 $ WRITE_RESULT "i_sysuio is ''perl_i_sysuio'"
1421 $!
1422 $! Check for sys/access.h
1423 $!
1424 $ OS
1425 $ WS "#ifdef __DECC
1426 $ WS "#include <stdlib.h>
1427 $ WS "#endif
1428 $ WS "#include <stdio.h>
1429 $ WS "#include <unistd.h>
1430 $ WS "#include <sys/access.h>
1431 $ WS "int main()
1432 $ WS "{"
1433 $ WS "exit(0);
1434 $ WS "}"
1435 $ CS
1436 $   DEFINE SYS$ERROR _NLA0:
1437 $   DEFINE SYS$OUTPUT _NLA0:
1438 $   on error then continue
1439 $   on warning then continue
1440 $   'Checkcc' temp.c
1441 $   savedstatus = $status
1442 $   teststatus = f$extract(9,1,savedstatus)
1443 $   if (teststatus.nes."1")
1444 $   THEN
1445 $     perl_i_sysaccess="undef"
1446 $     DEASSIGN SYS$OUTPUT
1447 $     DEASSIGN SYS$ERROR
1448 $   ELSE
1449 $     If (Needs_Opt.eqs."Yes")
1450 $     THEN
1451 $       link temp.obj,temp.opt/opt
1452 $     else
1453 $       link temp.obj
1454 $     endif
1455 $     savedstatus = $status
1456 $     teststatus = f$extract(9,1,savedstatus)
1457 $     DEASSIGN SYS$OUTPUT
1458 $     DEASSIGN SYS$ERROR
1459 $     if (teststatus.nes."1")
1460 $     THEN
1461 $       perl_i_sysaccess="undef"
1462 $     ELSE
1463 $       perl_i_sysaccess="define"
1464 $     ENDIF
1465 $   ENDIF
1466 $ WRITE_RESULT "i_sysaccess is ''perl_i_sysaccess'"
1467 $!
1468 $! Check for sys/security.h
1469 $!
1470 $ OS
1471 $ WS "#ifdef __DECC
1472 $ WS "#include <stdlib.h>
1473 $ WS "#endif
1474 $ WS "#include <stdio.h>
1475 $ WS "#include <unistd.h>
1476 $ WS "#include <sys/security.h>
1477 $ WS "int main()
1478 $ WS "{"
1479 $ WS "exit(0);
1480 $ WS "}"
1481 $ CS
1482 $   DEFINE SYS$ERROR _NLA0:
1483 $   DEFINE SYS$OUTPUT _NLA0:
1484 $   on error then continue
1485 $   on warning then continue
1486 $   'Checkcc' temp.c
1487 $   savedstatus = $status
1488 $   teststatus = f$extract(9,1,savedstatus)
1489 $   if (teststatus.nes."1")
1490 $   THEN
1491 $     perl_i_syssecrt="undef"
1492 $     DEASSIGN SYS$OUTPUT
1493 $     DEASSIGN SYS$ERROR
1494 $   ELSE
1495 $     If (Needs_Opt.eqs."Yes")
1496 $     THEN
1497 $       link temp.obj,temp.opt/opt
1498 $     else
1499 $       link temp.obj
1500 $     endif
1501 $     savedstatus = $status
1502 $     teststatus = f$extract(9,1,savedstatus)
1503 $     DEASSIGN SYS$OUTPUT
1504 $     DEASSIGN SYS$ERROR
1505 $     if (teststatus.nes."1")
1506 $     THEN
1507 $       perl_i_syssecrt="undef"
1508 $     ELSE
1509 $       perl_i_syssecrt="define"
1510 $     ENDIF
1511 $   ENDIF
1512 $ WRITE_RESULT "i_syssecrt is ''perl_i_syssecrt'"
1513 $!
1514 $! Check for fcntl.h
1515 $!
1516 $ OS
1517 $ WS "#ifdef __DECC
1518 $ WS "#include <stdlib.h>
1519 $ WS "#endif
1520 $ WS "#include <stdio.h>
1521 $ WS "#include <unistd.h>
1522 $ WS "#include <fcntl.h>
1523 $ WS "int main()
1524 $ WS "{"
1525 $ WS "exit(0);
1526 $ WS "}"
1527 $ CS
1528 $   DEFINE SYS$ERROR _NLA0:
1529 $   DEFINE SYS$OUTPUT _NLA0:
1530 $   on error then continue
1531 $   on warning then continue
1532 $   'Checkcc' temp.c
1533 $   savedstatus = $status
1534 $   teststatus = f$extract(9,1,savedstatus)
1535 $   if (teststatus.nes."1")
1536 $   THEN
1537 $     perl_i_fcntl="undef"
1538 $     DEASSIGN SYS$OUTPUT
1539 $     DEASSIGN SYS$ERROR
1540 $   ELSE
1541 $     If (Needs_Opt.eqs."Yes")
1542 $     THEN
1543 $       link temp.obj,temp.opt/opt
1544 $     else
1545 $       link temp.obj
1546 $     endif
1547 $     savedstatus = $status
1548 $     teststatus = f$extract(9,1,savedstatus)
1549 $     DEASSIGN SYS$OUTPUT
1550 $     DEASSIGN SYS$ERROR
1551 $     if (teststatus.nes."1")
1552 $     THEN
1553 $       perl_i_fcntl="undef"
1554 $     ELSE
1555 $       perl_i_fcntl="define"
1556 $     ENDIF
1557 $   ENDIF
1558 $ WRITE_RESULT "i_fcntl is ''perl_i_fcntl'"
1559 $!
1560 $! Check for fcntl
1561 $!
1562 $ OS
1563 $ WS "#ifdef __DECC
1564 $ WS "#include <stdlib.h>
1565 $ WS "#endif
1566 $ WS "#include <stdio.h>
1567 $ WS "#include <unistd.h>
1568 $ WS "#include <fcntl.h>
1569 $ WS "int main()
1570 $ WS "{"
1571 $ WS "fcntl(1,2,3);
1572 $ WS "exit(0);
1573 $ WS "}"
1574 $ CS
1575 $   DEFINE SYS$ERROR _NLA0:
1576 $   DEFINE SYS$OUTPUT _NLA0:
1577 $   on error then continue
1578 $   on warning then continue
1579 $   'Checkcc' temp.c
1580 $   savedstatus = $status
1581 $   teststatus = f$extract(9,1,savedstatus)
1582 $   if (teststatus.nes."1")
1583 $   THEN
1584 $     perl_d_fcntl="undef"
1585 $     DEASSIGN SYS$OUTPUT
1586 $     DEASSIGN SYS$ERROR
1587 $   ELSE
1588 $     If (Needs_Opt.eqs."Yes")
1589 $     THEN
1590 $       link temp.obj,temp.opt/opt
1591 $     else
1592 $       link temp.obj
1593 $     endif
1594 $     savedstatus = $status
1595 $     teststatus = f$extract(9,1,savedstatus)
1596 $     DEASSIGN SYS$OUTPUT
1597 $     DEASSIGN SYS$ERROR
1598 $     if (teststatus.nes."1")
1599 $     THEN
1600 $       perl_d_fcntl="undef"
1601 $     ELSE
1602 $       perl_d_fcntl="define"
1603 $     ENDIF
1604 $   ENDIF
1605 $ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
1606 $!
1607 $! Check for memchr
1608 $!
1609 $ OS
1610 $ WS "#ifdef __DECC
1611 $ WS "#include <stdlib.h>
1612 $ WS "#endif
1613 $ WS "#include <string.h>
1614 $ WS "int main()
1615 $ WS "{"
1616 $ WS "char * place;
1617 $ WS "place = memchr(""foo"", 47, 3)
1618 $ WS "exit(0);
1619 $ WS "}"
1620 $ CS
1621 $   DEFINE SYS$ERROR _NLA0:
1622 $   DEFINE SYS$OUTPUT _NLA0:
1623 $   on error then continue
1624 $   on warning then continue
1625 $   'Checkcc' temp.c
1626 $   savedstatus = $status
1627 $   teststatus = f$extract(9,1,savedstatus)
1628 $   if (teststatus.nes."1")
1629 $   THEN
1630 $     perl_d_memchr="undef"
1631 $     DEASSIGN SYS$OUTPUT
1632 $     DEASSIGN SYS$ERROR
1633 $   ELSE
1634 $     If (Needs_Opt.eqs."Yes")
1635 $     THEN
1636 $       link temp.obj,temp.opt/opt
1637 $     else
1638 $       link temp.obj
1639 $     endif
1640 $     savedstatus = $status
1641 $     teststatus = f$extract(9,1,savedstatus)
1642 $     DEASSIGN SYS$OUTPUT
1643 $     DEASSIGN SYS$ERROR
1644 $     if (teststatus.nes."1")
1645 $     THEN
1646 $       perl_d_memchr="undef"
1647 $     ELSE
1648 $       perl_d_memchr="define"
1649 $     ENDIF
1650 $   ENDIF
1651 $ WRITE_RESULT "d_memchr is ''perl_d_memchr'"
1652 $!
1653 $! Check for strtoull
1654 $!
1655 $ OS
1656 $ WS "#ifdef __DECC
1657 $ WS "#include <stdlib.h>
1658 $ WS "#endif
1659 $ WS "#include <string.h>
1660 $ WS "int main()
1661 $ WS "{"
1662 $ WS "unsigned __int64 result;
1663 $ WS "result = strtoull(""123123"", NULL, 10);
1664 $ WS "exit(0);
1665 $ WS "}"
1666 $ CS
1667 $   DEFINE SYS$ERROR _NLA0:
1668 $   DEFINE SYS$OUTPUT _NLA0:
1669 $   on error then continue
1670 $   on warning then continue
1671 $   'Checkcc' temp.c
1672 $   savedstatus = $status
1673 $   teststatus = f$extract(9,1,savedstatus)
1674 $   if (teststatus.nes."1")
1675 $   THEN
1676 $     perl_d_strtoull="undef"
1677 $     DEASSIGN SYS$OUTPUT
1678 $     DEASSIGN SYS$ERROR
1679 $   ELSE
1680 $     If (Needs_Opt.eqs."Yes")
1681 $     THEN
1682 $       link temp.obj,temp.opt/opt
1683 $     else
1684 $       link temp.obj
1685 $     endif
1686 $     savedstatus = $status
1687 $     teststatus = f$extract(9,1,savedstatus)
1688 $     DEASSIGN SYS$OUTPUT
1689 $     DEASSIGN SYS$ERROR
1690 $     if (teststatus.nes."1")
1691 $     THEN
1692 $       perl_d_strtoull="undef"
1693 $     ELSE
1694 $       perl_d_strtoull="define"
1695 $     ENDIF
1696 $   ENDIF
1697 $ WRITE_RESULT "d_strtoull is ''perl_d_strtoull'"
1698 $!
1699 $! Check for atoll
1700 $!
1701 $ OS
1702 $ WS "#ifdef __DECC
1703 $ WS "#include <stdlib.h>
1704 $ WS "#endif
1705 $ WS "#include <string.h>
1706 $ WS "int main()
1707 $ WS "{"
1708 $ WS " __int64 result;
1709 $ WS "result = atoll(""123123"");
1710 $ WS "exit(0);
1711 $ WS "}"
1712 $ CS
1713 $   DEFINE SYS$ERROR _NLA0:
1714 $   DEFINE SYS$OUTPUT _NLA0:
1715 $   on error then continue
1716 $   on warning then continue
1717 $   'Checkcc' temp.c
1718 $   savedstatus = $status
1719 $   teststatus = f$extract(9,1,savedstatus)
1720 $   if (teststatus.nes."1")
1721 $   THEN
1722 $     perl_d_atoll="undef"
1723 $     DEASSIGN SYS$OUTPUT
1724 $     DEASSIGN SYS$ERROR
1725 $   ELSE
1726 $     If (Needs_Opt.eqs."Yes")
1727 $     THEN
1728 $       link temp.obj,temp.opt/opt
1729 $     else
1730 $       link temp.obj
1731 $     endif
1732 $     savedstatus = $status
1733 $     teststatus = f$extract(9,1,savedstatus)
1734 $     DEASSIGN SYS$OUTPUT
1735 $     DEASSIGN SYS$ERROR
1736 $     if (teststatus.nes."1")
1737 $     THEN
1738 $       perl_d_atoll="undef"
1739 $     ELSE
1740 $       perl_d_atoll="define"
1741 $     ENDIF
1742 $   ENDIF
1743 $ WRITE_RESULT "d_atoll is ''perl_d_atoll'"
1744 $!
1745 $! Check for atoll
1746 $!
1747 $ OS
1748 $ WS "#ifdef __DECC
1749 $ WS "#include <stdlib.h>
1750 $ WS "#endif
1751 $ WS "#include <string.h>
1752 $ WS "int main()
1753 $ WS "{"
1754 $ WS "long double
1755 $ WS "result = atolf(""123123"");
1756 $ WS "exit(0);
1757 $ WS "}"
1758 $ CS
1759 $   DEFINE SYS$ERROR _NLA0:
1760 $   DEFINE SYS$OUTPUT _NLA0:
1761 $   on error then continue
1762 $   on warning then continue
1763 $   'Checkcc' temp.c
1764 $   savedstatus = $status
1765 $   teststatus = f$extract(9,1,savedstatus)
1766 $   if (teststatus.nes."1")
1767 $   THEN
1768 $     perl_d_atolf="undef"
1769 $     DEASSIGN SYS$OUTPUT
1770 $     DEASSIGN SYS$ERROR
1771 $   ELSE
1772 $     If (Needs_Opt.eqs."Yes")
1773 $     THEN
1774 $       link temp.obj,temp.opt/opt
1775 $     else
1776 $       link temp.obj
1777 $     endif
1778 $     savedstatus = $status
1779 $     teststatus = f$extract(9,1,savedstatus)
1780 $     DEASSIGN SYS$OUTPUT
1781 $     DEASSIGN SYS$ERROR
1782 $     if (teststatus.nes."1")
1783 $     THEN
1784 $       perl_d_atolf="undef"
1785 $     ELSE
1786 $       perl_d_atolf="define"
1787 $     ENDIF
1788 $   ENDIF
1789 $ WRITE_RESULT "d_atolf is ''perl_d_atolf'"
1790 $!
1791 $! Check for access
1792 $!
1793 $ OS
1794 $ WS "#ifdef __DECC
1795 $ WS "#include <stdlib.h>
1796 $ WS "#endif
1797 $ WS "#include <stdio.h>
1798 $ WS "#include <unistd.h>
1799 $ WS "int main()
1800 $ WS "{"
1801 $ WS "access("foo", F_OK);
1802 $ WS "exit(0);
1803 $ WS "}"
1804 $ CS
1805 $   DEFINE SYS$ERROR _NLA0:
1806 $   DEFINE SYS$OUTPUT _NLA0:
1807 $   on error then continue
1808 $   on warning then continue
1809 $   'Checkcc' temp.c
1810 $   savedstatus = $status
1811 $   teststatus = f$extract(9,1,savedstatus)
1812 $   if (teststatus.nes."1")
1813 $   THEN
1814 $     perl_d_access="undef"
1815 $     DEASSIGN SYS$OUTPUT
1816 $     DEASSIGN SYS$ERROR
1817 $   ELSE
1818 $     If (Needs_Opt.eqs."Yes")
1819 $     THEN
1820 $       link temp.obj,temp.opt/opt
1821 $     else
1822 $       link temp.obj
1823 $     endif
1824 $     savedstatus = $status
1825 $     teststatus = f$extract(9,1,savedstatus)
1826 $     DEASSIGN SYS$OUTPUT
1827 $     DEASSIGN SYS$ERROR
1828 $     if (teststatus.nes."1")
1829 $     THEN
1830 $       perl_d_access="undef"
1831 $     ELSE
1832 $       perl_d_access="define"
1833 $     ENDIF
1834 $   ENDIF
1835 $ WRITE_RESULT "d_access is ''perl_d_access'"
1836 $!
1837 $! Check for bzero
1838 $!
1839 $ OS
1840 $ WS "#ifdef __DECC
1841 $ WS "#include <stdlib.h>
1842 $ WS "#endif
1843 $ WS "#include <stdio.h>
1844 $ WS "#include <strings.h>
1845 $ WS "int main()
1846 $ WS "{"
1847 $ WS "char foo[10];
1848 $ WS "bzero(foo, 10);
1849 $ WS "exit(0);
1850 $ WS "}"
1851 $ CS
1852 $   DEFINE SYS$ERROR _NLA0:
1853 $   DEFINE SYS$OUTPUT _NLA0:
1854 $   on error then continue
1855 $   on warning then continue
1856 $   'Checkcc' temp.c
1857 $   savedstatus = $status
1858 $   teststatus = f$extract(9,1,savedstatus)
1859 $   if (teststatus.nes."1")
1860 $   THEN
1861 $     perl_d_bzero="undef"
1862 $     DEASSIGN SYS$OUTPUT
1863 $     DEASSIGN SYS$ERROR
1864 $   ELSE
1865 $     If (Needs_Opt.eqs."Yes")
1866 $     THEN
1867 $       link temp.obj,temp.opt/opt
1868 $     else
1869 $       link temp.obj
1870 $     endif
1871 $     savedstatus = $status
1872 $     teststatus = f$extract(9,1,savedstatus)
1873 $     DEASSIGN SYS$OUTPUT
1874 $     DEASSIGN SYS$ERROR
1875 $     if (teststatus.nes."1")
1876 $     THEN
1877 $       perl_d_bzero="undef"
1878 $     ELSE
1879 $       perl_d_bzero="define"
1880 $     ENDIF
1881 $   ENDIF
1882 $ WRITE_RESULT "d_bzero is ''perl_d_bzero'"
1883 $!
1884 $! Check for bcopy
1885 $!
1886 $ OS
1887 $ WS "#ifdef __DECC
1888 $ WS "#include <stdlib.h>
1889 $ WS "#endif
1890 $ WS "#include <stdio.h>
1891 $ WS "#include <strings.h>
1892 $ WS "int main()
1893 $ WS "{"
1894 $ WS "char foo[10], bar[10];
1895 $ WS "bcopy(""foo"", bar, 3);
1896 $ WS "exit(0);
1897 $ WS "}"
1898 $ CS
1899 $   DEFINE SYS$ERROR _NLA0:
1900 $   DEFINE SYS$OUTPUT _NLA0:
1901 $   on error then continue
1902 $   on warning then continue
1903 $   'Checkcc' temp.c
1904 $   savedstatus = $status
1905 $   teststatus = f$extract(9,1,savedstatus)
1906 $   if (teststatus.nes."1")
1907 $   THEN
1908 $     perl_d_bcopy="undef"
1909 $     DEASSIGN SYS$OUTPUT
1910 $     DEASSIGN SYS$ERROR
1911 $   ELSE
1912 $     If (Needs_Opt.eqs."Yes")
1913 $     THEN
1914 $       link temp.obj,temp.opt/opt
1915 $     else
1916 $       link temp.obj
1917 $     endif
1918 $     savedstatus = $status
1919 $     teststatus = f$extract(9,1,savedstatus)
1920 $     DEASSIGN SYS$OUTPUT
1921 $     DEASSIGN SYS$ERROR
1922 $     if (teststatus.nes."1")
1923 $     THEN
1924 $       perl_d_bcopy="undef"
1925 $     ELSE
1926 $       perl_d_bcopy="define"
1927 $     ENDIF
1928 $   ENDIF
1929 $ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'"
1930 $!
1931 $! Check for mkstemp
1932 $!
1933 $ OS
1934 $ WS "#ifdef __DECC
1935 $ WS "#include <stdlib.h>
1936 $ WS "#endif
1937 $ WS "#include <stdio.h>
1938 $ WS "int main()
1939 $ WS "{"
1940 $ WS "mkstemp(""foo"");
1941 $ WS "exit(0);
1942 $ WS "}"
1943 $ CS
1944 $   DEFINE SYS$ERROR _NLA0:
1945 $   DEFINE SYS$OUTPUT _NLA0:
1946 $   on error then continue
1947 $   on warning then continue
1948 $   'Checkcc' temp.c
1949 $   If (Needs_Opt.eqs."Yes")
1950 $   THEN
1951 $     link temp.obj,temp.opt/opt
1952 $   else
1953 $     link temp.obj
1954 $   endif
1955 $   savedstatus = $status
1956 $   teststatus = f$extract(9,1,savedstatus)
1957 $   DEASSIGN SYS$OUTPUT
1958 $   DEASSIGN SYS$ERROR
1959 $   if (teststatus.nes."1")
1960 $   THEN
1961 $     perl_d_mkstemp="undef"
1962 $   ELSE
1963 $     perl_d_mkstemp="define"
1964 $   ENDIF
1965 $ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'"
1966 $!
1967 $! Check for setvbuf
1968 $!
1969 $ OS
1970 $ WS "#ifdef __DECC
1971 $ WS "#include <stdlib.h>
1972 $ WS "#endif
1973 $ WS "#include <stdio.h>
1974 $ WS "int main()
1975 $ WS "{"
1976 $ WS "FILE *foo;
1977 $ WS "char Buffer[99];
1978 $ WS "foo = fopen(""foo"", ""r"");
1979 $ WS "setvbuf(foo, Buffer, 0, 0);
1980 $ WS "exit(0);
1981 $ WS "}"
1982 $ CS
1983 $   DEFINE SYS$ERROR _NLA0:
1984 $   DEFINE SYS$OUTPUT _NLA0:
1985 $   on error then continue
1986 $   on warning then continue
1987 $   'Checkcc' temp.c
1988 $   If (Needs_Opt.eqs."Yes")
1989 $   THEN
1990 $     link temp.obj,temp.opt/opt
1991 $   else
1992 $     link temp.obj
1993 $   endif
1994 $   teststatus = f$extract(9,1,$status)
1995 $   DEASSIGN SYS$OUTPUT
1996 $   DEASSIGN SYS$ERROR
1997 $   if (teststatus.nes."1")
1998 $   THEN
1999 $     perl_d_setvbuf="undef"
2000 $   ELSE
2001 $     perl_d_setvbuf="define"
2002 $   ENDIF
2003 $ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
2004 $!
2005 $! Check for setenv
2006 $!
2007 $ OS
2008 $ WS "#ifdef __DECC
2009 $ WS "#include <stdlib.h>
2010 $ WS "#endif
2011 $ WS "#include <stdio.h>
2012 $ WS "int main()
2013 $ WS "{"
2014 $ WS "setenv(""FOO"", ""BAR"", 0);
2015 $ WS "exit(0);
2016 $ WS "}"
2017 $ CS
2018 $   DEFINE SYS$ERROR _NLA0:
2019 $   DEFINE SYS$OUTPUT _NLA0:
2020 $   on error then continue
2021 $   on warning then continue
2022 $   'Checkcc' temp
2023 $   If (Needs_Opt.eqs."Yes")
2024 $   THEN
2025 $     link temp,temp/opt
2026 $   else
2027 $     link temp
2028 $   endif
2029 $   teststatus = f$extract(9,1,$status)
2030 $   DEASSIGN SYS$OUTPUT
2031 $   DEASSIGN SYS$ERROR
2032 $   if (teststatus.nes."1")
2033 $   THEN
2034 $     perl_d_setenv="undef"
2035 $   ELSE
2036 $     perl_d_setenv="define"
2037 $   ENDIF
2038 $ WRITE_RESULT "d_setenv is ''perl_d_setenv'"
2039 $!
2040 $! Check for <netinet/in.h>
2041 $!
2042 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2043 $ THEN
2044 $ OS
2045 $ WS "#ifdef __DECC
2046 $ WS "#include <stdlib.h>
2047 $ WS "#endif
2048 $ WS "#include <stdio.h>
2049 $ if ("''Has_Socketshr'".eqs."T")
2050 $ THEN
2051 $  WS "#include <socketshr.h>"
2052 $ else
2053 $  WS "#include <netdb.h>
2054 $ endif
2055 $ WS "#include <netinet/in.h>"
2056 $ WS "int main()
2057 $ WS "{"
2058 $ WS "exit(0);
2059 $ WS "}"
2060 $ CS
2061 $   DEFINE SYS$ERROR _NLA0:
2062 $   DEFINE SYS$OUTPUT _NLA0:
2063 $   on error then continue
2064 $   on warning then continue
2065 $   'Checkcc' temp.c
2066 $   If (Needs_Opt.eqs."Yes")
2067 $   THEN
2068 $     link temp.obj,temp.opt/opt
2069 $   else
2070 $     link temp.obj
2071 $   endif
2072 $   teststatus = f$extract(9,1,$status)
2073 $   DEASSIGN SYS$OUTPUT
2074 $   DEASSIGN SYS$ERROR
2075 $   if (teststatus.nes."1")
2076 $   THEN
2077 $     perl_i_niin="undef"
2078 $   ELSE
2079 $     perl_i_niin="define"
2080 $   ENDIF
2081 $ ELSE
2082 $   perl_i_niin="undef"
2083 $ ENDIF
2084 $ WRITE_RESULT "i_niin is ''perl_i_niin'"
2085 $!
2086 $! Check for <netinet/tcp.h>
2087 $!
2088 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2089 $ THEN
2090 $ OS
2091 $ WS "#ifdef __DECC
2092 $ WS "#include <stdlib.h>
2093 $ WS "#endif
2094 $ WS "#include <stdio.h>
2095 $ if ("''Has_Socketshr'".eqs."T")
2096 $ THEN
2097 $  WS "#include <socketshr.h>"
2098 $ else
2099 $  WS "#include <netdb.h>
2100 $ endif
2101 $ WS "#include <netinet/tcp.h>"
2102 $ WS "int main()
2103 $ WS "{"
2104 $ WS "exit(0);
2105 $ WS "}"
2106 $ CS
2107 $   DEFINE SYS$ERROR _NLA0:
2108 $   DEFINE SYS$OUTPUT _NLA0:
2109 $   on error then continue
2110 $   on warning then continue
2111 $   'Checkcc' temp.c
2112 $   If (Needs_Opt.eqs."Yes")
2113 $   THEN
2114 $     link temp.obj,temp.opt/opt
2115 $   else
2116 $     link temp.obj
2117 $   endif
2118 $   teststatus = f$extract(9,1,$status)
2119 $   DEASSIGN SYS$OUTPUT
2120 $   DEASSIGN SYS$ERROR
2121 $   if (teststatus.nes."1")
2122 $   THEN
2123 $     perl_i_netinettcp="undef"
2124 $   ELSE
2125 $     perl_i_netinettcp="define"
2126 $   ENDIF
2127 $ ELSE
2128 $   perl_i_netinettcp="undef"
2129 $ ENDIF
2130 $ WRITE_RESULT "i_netinettcp is ''perl_i_netinettcp'"
2131 $!
2132 $! Check for endhostent
2133 $!
2134 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2135 $ THEN
2136 $ OS
2137 $ WS "#ifdef __DECC
2138 $ WS "#include <stdlib.h>
2139 $ WS "#endif
2140 $ WS "#include <stdio.h>
2141 $ if ("''Has_Socketshr'".eqs."T")
2142 $ THEN
2143 $  WS "#include <socketshr.h>"
2144 $ else
2145 $  WS "#include <netdb.h>
2146 $ endif
2147 $ WS "int main()
2148 $ WS "{"
2149 $ WS "endhostent();
2150 $ WS "exit(0);
2151
2152 $ CS
2153 $   DEFINE SYS$ERROR _NLA0:
2154 $   DEFINE SYS$OUTPUT _NLA0:
2155 $   on error then continue
2156 $   on warning then continue
2157 $   'Checkcc' temp.c
2158 $   If (Needs_Opt.eqs."Yes")
2159 $   THEN
2160 $     link temp.obj,temp.opt/opt
2161 $   else
2162 $     link temp.obj
2163 $   endif
2164 $   teststatus = f$extract(9,1,$status)
2165 $   DEASSIGN SYS$OUTPUT
2166 $   DEASSIGN SYS$ERROR
2167 $   if (teststatus.nes."1")
2168 $   THEN
2169 $     perl_d_endhent="undef"
2170 $   ELSE
2171 $     perl_d_endhent="define"
2172 $   ENDIF
2173 $ ELSE
2174 $ perl_d_endhent="undef"
2175 $ ENDIF
2176 $ WRITE_RESULT "d_endhent is ''perl_d_endhent'"
2177 $!
2178 $! Check for endnetent
2179 $!
2180 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2181 $ THEN
2182 $ OS
2183 $ WS "#ifdef __DECC
2184 $ WS "#include <stdlib.h>
2185 $ WS "#endif
2186 $ WS "#include <stdio.h>
2187 $ if ("''Has_Socketshr'".eqs."T")
2188 $ THEN
2189 $  WS "#include <socketshr.h>"
2190 $ else
2191 $  WS "#include <netdb.h>
2192 $ endif
2193 $ WS "int main()
2194 $ WS "{"
2195 $ WS "endnetent();
2196 $ WS "exit(0);
2197 $ WS "}"
2198 $ CS
2199 $   DEFINE SYS$ERROR _NLA0:
2200 $   DEFINE SYS$OUTPUT _NLA0:
2201 $   on error then continue
2202 $   on warning then continue
2203 $   'Checkcc' temp.c
2204 $   If (Needs_Opt.eqs."Yes")
2205 $   THEN
2206 $     link temp.obj,temp.opt/opt
2207 $   else
2208 $     link temp.obj
2209 $   endif
2210 $   teststatus = f$extract(9,1,$status)
2211 $   DEASSIGN SYS$OUTPUT
2212 $   DEASSIGN SYS$ERROR
2213 $   if (teststatus.nes."1")
2214 $   THEN
2215 $     perl_d_endnent="undef"
2216 $   ELSE
2217 $     perl_d_endnent="define"
2218 $   ENDIF
2219 $ ELSE
2220 $ perl_d_endnent="undef"
2221 $ ENDIF
2222 $ WRITE_RESULT "d_endnent is ''perl_d_endnent'"
2223 $!
2224 $! Check for endprotoent
2225 $!
2226 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2227 $ THEN
2228 $ OS
2229 $ WS "#ifdef __DECC
2230 $ WS "#include <stdlib.h>
2231 $ WS "#endif
2232 $ WS "#include <stdio.h>
2233 $ if ("''Has_Socketshr'".eqs."T")
2234 $ THEN
2235 $  WS "#include <socketshr.h>"
2236 $ else
2237 $  WS "#include <netdb.h>
2238 $ endif
2239 $ WS "int main()
2240 $ WS "{"
2241 $ WS "endprotoent();
2242 $ WS "exit(0);
2243 $ WS "}"
2244 $ CS
2245 $   DEFINE SYS$ERROR _NLA0:
2246 $   DEFINE SYS$OUTPUT _NLA0:
2247 $   on error then continue
2248 $   on warning then continue
2249 $   'Checkcc' temp.c
2250 $   If (Needs_Opt.eqs."Yes")
2251 $   THEN
2252 $     link temp.obj,temp.opt/opt
2253 $   else
2254 $     link temp.obj
2255 $   endif
2256 $   teststatus = f$extract(9,1,$status)
2257 $   DEASSIGN SYS$OUTPUT
2258 $   DEASSIGN SYS$ERROR
2259 $   if (teststatus.nes."1")
2260 $   THEN
2261 $     perl_d_endpent="undef"
2262 $   ELSE
2263 $     perl_d_endpent="define"
2264 $   ENDIF
2265 $ ELSE
2266 $ perl_d_endpent="undef"
2267 $ ENDIF
2268 $ WRITE_RESULT "d_endpent is ''perl_d_endpent'"
2269 $!
2270 $! Check for endservent
2271 $!
2272 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2273 $ THEN
2274 $ OS
2275 $ WS "#ifdef __DECC
2276 $ WS "#include <stdlib.h>
2277 $ WS "#endif
2278 $ WS "#include <stdio.h>
2279 $ if ("''Has_Socketshr'".eqs."T")
2280 $ THEN
2281 $  WS "#include <socketshr.h>"
2282 $ else
2283 $  WS "#include <netdb.h>
2284 $ endif
2285 $ WS "int main()
2286 $ WS "{"
2287 $ WS "endservent();
2288 $ WS "exit(0);
2289 $ WS "}"
2290 $ CS
2291 $   DEFINE SYS$ERROR _NLA0:
2292 $   DEFINE SYS$OUTPUT _NLA0:
2293 $   on error then continue
2294 $   on warning then continue
2295 $   'Checkcc' temp.c
2296 $   If (Needs_Opt.eqs."Yes")
2297 $   THEN
2298 $     link temp.obj,temp.opt/opt
2299 $   else
2300 $     link temp.obj
2301 $   endif
2302 $   teststatus = f$extract(9,1,$status)
2303 $   DEASSIGN SYS$OUTPUT
2304 $   DEASSIGN SYS$ERROR
2305 $   if (teststatus.nes."1")
2306 $   THEN
2307 $     perl_d_endsent="undef"
2308 $   ELSE
2309 $     perl_d_endsent="define"
2310 $   ENDIF
2311 $ ELSE
2312 $ perl_d_endsent="undef"
2313 $ ENDIF
2314 $ WRITE_RESULT "d_endsent is ''perl_d_endsent'"
2315 $!
2316 $! Check for sethostent
2317 $!
2318 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2319 $ THEN
2320 $ OS
2321 $ WS "#ifdef __DECC
2322 $ WS "#include <stdlib.h>
2323 $ WS "#endif
2324 $ WS "#include <stdio.h>
2325 $ if ("''Has_Socketshr'".eqs."T")
2326 $ THEN
2327 $  WS "#include <socketshr.h>"
2328 $ else
2329 $  WS "#include <netdb.h>
2330 $ endif
2331 $ WS "int main()
2332 $ WS "{"
2333 $ WS "sethostent(1);
2334 $ WS "exit(0);
2335 $ WS "}"
2336 $ CS
2337 $   DEFINE SYS$ERROR _NLA0:
2338 $   DEFINE SYS$OUTPUT _NLA0:
2339 $   on error then continue
2340 $   on warning then continue
2341 $   'Checkcc' temp.c
2342 $   If (Needs_Opt.eqs."Yes")
2343 $   THEN
2344 $     link temp.obj,temp.opt/opt
2345 $   else
2346 $     link temp.obj
2347 $   endif
2348 $   teststatus = f$extract(9,1,$status)
2349 $   DEASSIGN SYS$OUTPUT
2350 $   DEASSIGN SYS$ERROR
2351 $   if (teststatus.nes."1")
2352 $   THEN
2353 $     perl_d_sethent="undef"
2354 $   ELSE
2355 $     perl_d_sethent="define"
2356 $   ENDIF
2357 $ ELSE
2358 $ perl_d_sethent="undef"
2359 $ ENDIF
2360 $ WRITE_RESULT "d_sethent is ''perl_d_sethent'"
2361 $!
2362 $! Check for setnetent
2363 $!
2364 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2365 $ THEN
2366 $ OS
2367 $ WS "#ifdef __DECC
2368 $ WS "#include <stdlib.h>
2369 $ WS "#endif
2370 $ WS "#include <stdio.h>
2371 $ if ("''Has_Socketshr'".eqs."T")
2372 $ THEN
2373 $  WS "#include <socketshr.h>"
2374 $ else
2375 $  WS "#include <netdb.h>
2376 $ endif
2377 $ WS "int main()
2378 $ WS "{"
2379 $ WS "setnetent(1);
2380 $ WS "exit(0);
2381 $ WS "}"
2382 $ CS
2383 $   DEFINE SYS$ERROR _NLA0:
2384 $   DEFINE SYS$OUTPUT _NLA0:
2385 $   on error then continue
2386 $   on warning then continue
2387 $   'Checkcc' temp.c
2388 $   If (Needs_Opt.eqs."Yes")
2389 $   THEN
2390 $     link temp.obj,temp.opt/opt
2391 $   else
2392 $     link temp.obj
2393 $   endif
2394 $   teststatus = f$extract(9,1,$status)
2395 $   DEASSIGN SYS$OUTPUT
2396 $   DEASSIGN SYS$ERROR
2397 $   if (teststatus.nes."1")
2398 $   THEN
2399 $     perl_d_setnent="undef"
2400 $   ELSE
2401 $     perl_d_setnent="define"
2402 $   ENDIF
2403 $ ELSE
2404 $ perl_d_setnent="undef"
2405 $ ENDIF
2406 $ WRITE_RESULT "d_setnent is ''perl_d_setnent'"
2407 $!
2408 $! Check for setprotoent
2409 $!
2410 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2411 $ THEN
2412 $ OS
2413 $ WS "#ifdef __DECC
2414 $ WS "#include <stdlib.h>
2415 $ WS "#endif
2416 $ WS "#include <stdio.h>
2417 $ if ("''Has_Socketshr'".eqs."T")
2418 $ THEN
2419 $  WS "#include <socketshr.h>"
2420 $ else
2421 $  WS "#include <netdb.h>
2422 $ endif
2423 $ WS "int main()
2424 $ WS "{"
2425 $ WS "setprotoent(1);
2426 $ WS "exit(0);
2427 $ WS "}"
2428 $ CS
2429 $   DEFINE SYS$ERROR _NLA0:
2430 $   DEFINE SYS$OUTPUT _NLA0:
2431 $   on error then continue
2432 $   on warning then continue
2433 $   'Checkcc' temp.c
2434 $   If (Needs_Opt.eqs."Yes")
2435 $   THEN
2436 $     link temp.obj,temp.opt/opt
2437 $   else
2438 $     link temp.obj
2439 $   endif
2440 $   teststatus = f$extract(9,1,$status)
2441 $   DEASSIGN SYS$OUTPUT
2442 $   DEASSIGN SYS$ERROR
2443 $   if (teststatus.nes."1")
2444 $   THEN
2445 $     perl_d_setpent="undef"
2446 $   ELSE
2447 $     perl_d_setpent="define"
2448 $   ENDIF
2449 $ ELSE
2450 $ perl_d_setpent="undef"
2451 $ ENDIF
2452 $ WRITE_RESULT "d_setpent is ''perl_d_setpent'"
2453 $!
2454 $! Check for setservent
2455 $!
2456 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2457 $ THEN
2458 $ OS
2459 $ WS "#ifdef __DECC
2460 $ WS "#include <stdlib.h>
2461 $ WS "#endif
2462 $ WS "#include <stdio.h>
2463 $ if ("''Has_Socketshr'".eqs."T")
2464 $ THEN
2465 $  WS "#include <socketshr.h>"
2466 $ else
2467 $  WS "#include <netdb.h>
2468 $ endif
2469 $ WS "int main()
2470 $ WS "{"
2471 $ WS "setservent(1);
2472 $ WS "exit(0);
2473 $ WS "}"
2474 $ CS
2475 $   DEFINE SYS$ERROR _NLA0:
2476 $   DEFINE SYS$OUTPUT _NLA0:
2477 $   on error then continue
2478 $   on warning then continue
2479 $   'Checkcc' temp.c
2480 $   If (Needs_Opt.eqs."Yes")
2481 $   THEN
2482 $     link temp.obj,temp.opt/opt
2483 $   else
2484 $     link temp.obj
2485 $   endif
2486 $   teststatus = f$extract(9,1,$status)
2487 $   DEASSIGN SYS$OUTPUT
2488 $   DEASSIGN SYS$ERROR
2489 $   if (teststatus.nes."1")
2490 $   THEN
2491 $     perl_d_setsent="undef"
2492 $   ELSE
2493 $     perl_d_setsent="define"
2494 $   ENDIF
2495 $ ELSE
2496 $ perl_d_setsent="undef"
2497 $ ENDIF
2498 $ WRITE_RESULT "d_setsent is ''perl_d_setsent'"
2499 $!
2500 $! Check for gethostent
2501 $!
2502 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2503 $ THEN
2504 $ OS
2505 $ WS "#ifdef __DECC
2506 $ WS "#include <stdlib.h>
2507 $ WS "#endif
2508 $ WS "#include <stdio.h>
2509 $ if ("''Has_Socketshr'".eqs."T")
2510 $ THEN
2511 $  WS "#include <socketshr.h>"
2512 $ else
2513 $  WS "#include <netdb.h>
2514 $ endif
2515 $ WS "int main()
2516 $ WS "{"
2517 $ WS "gethostent();
2518 $ WS "exit(0);
2519 $ WS "}"
2520 $ CS
2521 $   DEFINE SYS$ERROR _NLA0:
2522 $   DEFINE SYS$OUTPUT _NLA0:
2523 $   on error then continue
2524 $   on warning then continue
2525 $   'Checkcc' temp.c
2526 $   If (Needs_Opt.eqs."Yes")
2527 $   THEN
2528 $     link temp.obj,temp.opt/opt
2529 $   else
2530 $     link temp.obj
2531 $   endif
2532 $   teststatus = f$extract(9,1,$status)
2533 $   DEASSIGN SYS$OUTPUT
2534 $   DEASSIGN SYS$ERROR
2535 $   if (teststatus.nes."1")
2536 $   THEN
2537 $     perl_d_gethent="undef"
2538 $   ELSE
2539 $     perl_d_gethent="define"
2540 $   ENDIF
2541 $ ELSE
2542 $ perl_d_gethent="undef"
2543 $ ENDIF
2544 $ WRITE_RESULT "d_gethent is ''perl_d_gethent'"
2545 $!
2546 $! Check for getnetent
2547 $!
2548 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2549 $ THEN
2550 $ OS
2551 $ WS "#ifdef __DECC
2552 $ WS "#include <stdlib.h>
2553 $ WS "#endif
2554 $ WS "#include <stdio.h>
2555 $ if ("''Has_Socketshr'".eqs."T")
2556 $ THEN
2557 $  WS "#include <socketshr.h>"
2558 $ else
2559 $  WS "#include <netdb.h>
2560 $ endif
2561 $ WS "int main()
2562 $ WS "{"
2563 $ WS "getnetent();
2564 $ WS "exit(0);
2565 $ WS "}"
2566 $ CS
2567 $   DEFINE SYS$ERROR _NLA0:
2568 $   DEFINE SYS$OUTPUT _NLA0:
2569 $   on error then continue
2570 $   on warning then continue
2571 $   'Checkcc' temp.c
2572 $   If (Needs_Opt.eqs."Yes")
2573 $   THEN
2574 $     link temp.obj,temp.opt/opt
2575 $   else
2576 $     link temp.obj
2577 $   endif
2578 $   teststatus = f$extract(9,1,$status)
2579 $   DEASSIGN SYS$OUTPUT
2580 $   DEASSIGN SYS$ERROR
2581 $   if (teststatus.nes."1")
2582 $   THEN
2583 $     perl_d_getnent="undef"
2584 $   ELSE
2585 $     perl_d_getnent="define"
2586 $   ENDIF
2587 $ ELSE
2588 $ perl_d_getnent="undef"
2589 $ ENDIF
2590 $ WRITE_RESULT "d_getnent is ''perl_d_getnent'"
2591 $!
2592 $! Check for getprotoent
2593 $!
2594 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2595 $ THEN
2596 $ OS
2597 $ WS "#ifdef __DECC
2598 $ WS "#include <stdlib.h>
2599 $ WS "#endif
2600 $ WS "#include <stdio.h>
2601 $ if ("''Has_Socketshr'".eqs."T")
2602 $ THEN
2603 $  WS "#include <socketshr.h>"
2604 $ else
2605 $  WS "#include <netdb.h>
2606 $ endif
2607 $ WS "int main()
2608 $ WS "{"
2609 $ WS "getprotoent();
2610 $ WS "exit(0);
2611 $ WS "}"
2612 $ CS
2613 $   DEFINE SYS$ERROR _NLA0:
2614 $   DEFINE SYS$OUTPUT _NLA0:
2615 $   on error then continue
2616 $   on warning then continue
2617 $   'Checkcc' temp.c
2618 $   If (Needs_Opt.eqs."Yes")
2619 $   THEN
2620 $     link temp.obj,temp.opt/opt
2621 $   else
2622 $     link temp.obj
2623 $   endif
2624 $   teststatus = f$extract(9,1,$status)
2625 $   DEASSIGN SYS$OUTPUT
2626 $   DEASSIGN SYS$ERROR
2627 $   if (teststatus.nes."1")
2628 $   THEN
2629 $     perl_d_getpent="undef"
2630 $   ELSE
2631 $     perl_d_getpent="define"
2632 $   ENDIF
2633 $ ELSE
2634 $ perl_d_getpent="undef"
2635 $ ENDIF
2636 $ WRITE_RESULT "d_getpent is ''perl_d_getpent'"
2637 $!
2638 $! Check for getservent
2639 $!
2640 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2641 $ THEN
2642 $ OS
2643 $ WS "#ifdef __DECC
2644 $ WS "#include <stdlib.h>
2645 $ WS "#endif
2646 $ WS "#include <stdio.h>
2647 $ if ("''Has_Socketshr'".eqs."T")
2648 $ THEN
2649 $  WS "#include <socketshr.h>"
2650 $ else
2651 $  WS "#include <netdb.h>
2652 $ endif
2653 $ WS "int main()
2654 $ WS "{"
2655 $ WS "getservent();
2656 $ WS "exit(0);
2657 $ WS "}"
2658 $ CS
2659 $   DEFINE SYS$ERROR _NLA0:
2660 $   DEFINE SYS$OUTPUT _NLA0:
2661 $   on error then continue
2662 $   on warning then continue
2663 $   'Checkcc' temp.c
2664 $   If (Needs_Opt.eqs."Yes")
2665 $   THEN
2666 $     link temp.obj,temp.opt/opt
2667 $   else
2668 $     link temp.obj
2669 $   endif
2670 $   teststatus = f$extract(9,1,$status)
2671 $   DEASSIGN SYS$OUTPUT
2672 $   DEASSIGN SYS$ERROR
2673 $   if (teststatus.nes."1")
2674 $   THEN
2675 $     perl_d_getsent="undef"
2676 $   ELSE
2677 $     perl_d_getsent="define"
2678 $   ENDIF
2679 $ ELSE
2680 $ perl_d_getsent="undef"
2681 $ ENDIF
2682 $ WRITE_RESULT "d_getsent is ''perl_d_getsent'"
2683 $!
2684 $! Check for pthread_yield
2685 $!
2686 $ if ("''use_threads'".eqs."T")
2687 $ THEN
2688 $ OS
2689 $ WS "#ifdef __DECC
2690 $ WS "#include <stdlib.h>
2691 $ WS "#endif
2692 $ WS "#include <pthread.h>
2693 $ WS "#include <stdio.h>
2694 $ WS "int main()
2695 $ WS "{"
2696 $ WS "pthread_yield();
2697 $ WS "exit(0);
2698 $ WS "}"
2699 $ CS
2700 $   DEFINE SYS$ERROR _NLA0:
2701 $   DEFINE SYS$OUTPUT _NLA0:
2702 $   on error then continue
2703 $   on warning then continue
2704 $   'Checkcc' temp.c
2705 $   teststatus = f$extract(9,1,$status)
2706 $   DEASSIGN SYS$OUTPUT
2707 $   DEASSIGN SYS$ERROR
2708 $   if (teststatus.nes."1")
2709 $   THEN
2710 $     perl_d_pthread_yield="undef"
2711 $   ELSE
2712 $     perl_d_pthread_yield="define"
2713 $   ENDIF
2714 $ ELSE
2715 $   perl_d_pthread_yield="undef"
2716 $ ENDIF
2717 $ WRITE_RESULT "d_pthread_yield is ''perl_d_pthread_yield'"
2718 $!
2719 $! Check for sched_yield
2720 $!
2721 $ if ("''use_threads'".eqs."T")
2722 $ THEN
2723 $ OS
2724 $ WS "#ifdef __DECC
2725 $ WS "#include <stdlib.h>
2726 $ WS "#endif
2727 $ WS "#include <pthread.h>
2728 $ WS "#include <stdio.h>
2729 $ WS "int main()
2730 $ WS "{"
2731 $ WS "sched_yield();
2732 $ WS "exit(0);
2733 $ WS "}"
2734 $ CS
2735 $   DEFINE SYS$ERROR _NLA0:
2736 $   DEFINE SYS$OUTPUT _NLA0:
2737 $   on error then continue
2738 $   on warning then continue
2739 $   'Checkcc' temp.c
2740 $   teststatus = f$extract(9,1,$status)
2741 $   DEASSIGN SYS$OUTPUT
2742 $   DEASSIGN SYS$ERROR
2743 $   if (teststatus.nes."1")
2744 $   THEN
2745 $     perl_d_sched_yield="undef"
2746 $     perl_sched_yield = " "
2747 $   ELSE
2748 $     perl_d_sched_yield="define"
2749 $     perl_sched_yield = "sched_yield"
2750 $   ENDIF
2751 $ ELSE
2752 $   perl_d_sched_yield="undef"
2753 $   perl_sched_yield = " "
2754 $ ENDIF
2755 $ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
2756 $ WRITE_RESULT "sched_yield is ''perl_sched_yield'"
2757 $!
2758 $! Check for generic pointer size
2759 $!
2760 $ OS
2761 $ WS "#ifdef __DECC
2762 $ WS "#include <stdlib.h>
2763 $ WS "#endif
2764 $ WS "#include <stdio.h>
2765 $ WS "int main()
2766 $ WS "{"
2767 $ WS "int foo;
2768 $ WS "foo = sizeof(char *);
2769 $ WS "printf(""%d\n"", foo);
2770 $ WS "exit(0);
2771 $ WS "}"
2772 $ CS
2773 $! copy temp.c sys$output
2774 $!
2775 $   DEFINE SYS$ERROR _NLA0:
2776 $   DEFINE SYS$OUTPUT _NLA0:
2777 $   ON ERROR THEN CONTINUE
2778 $   ON WARNING THEN CONTINUE
2779 $   'Checkcc' temp.c
2780 $   If (Needs_Opt.eqs."Yes")
2781 $   THEN
2782 $     link temp.obj,temp.opt/opt
2783 $   else
2784 $     link temp.obj
2785 $   endif
2786 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
2787 $   DEASSIGN SYS$OUTPUT
2788 $   DEASSIGN SYS$ERROR
2789 $   DEFINE SYS$ERROR TEMPOUT
2790 $   DEFINE SYS$OUTPUT TEMPOUT
2791 $   mcr []temp
2792 $   CLOSE TEMPOUT
2793 $   DEASSIGN SYS$OUTPUT
2794 $   DEASSIGN SYS$ERROR
2795 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
2796 $   READ TEMPOUT line
2797 $   CLOSE TEMPOUT
2798
2799 $ perl_ptrsize=line
2800 $ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
2801 $!
2802 $!
2803 $! Check rand48 and its ilk
2804 $!
2805 $ OS
2806 $ WS "#ifdef __DECC
2807 $ WS "#include <stdlib.h>
2808 $ WS "#endif
2809 $ WS "#include <stdio.h>
2810 $ WS "int main()
2811 $ WS "{"
2812 $ WS "srand48(12L);"
2813 $ WS "exit(0);
2814 $ WS "}"
2815 $ CS
2816 $! copy temp.c sys$output
2817 $!
2818 $   DEFINE SYS$ERROR _NLA0:
2819 $   DEFINE SYS$OUTPUT _NLA0:
2820 $   ON ERROR THEN CONTINUE
2821 $   ON WARNING THEN CONTINUE
2822 $   'Checkcc' temp
2823 $   If (Needs_Opt.eqs."Yes")
2824 $   THEN
2825 $     link temp,temp.opt/opt
2826 $   else
2827 $     link temp
2828 $   endif
2829 $   teststatus = f$extract(9,1,$status)
2830 $   DEASSIGN SYS$OUTPUT
2831 $   DEASSIGN SYS$ERROR
2832 $   if (teststatus.nes."1")
2833 $   THEN
2834 $     perl_drand01="random()"
2835 $     perl_randseedtype = "unsigned"
2836 $     perl_seedfunc = "srandom"
2837 $   ENDIF
2838 $ OS
2839 $ WS "#ifdef __DECC
2840 $ WS "#include <stdlib.h>
2841 $ WS "#endif
2842 $ WS "#include <stdio.h>
2843 $ WS "int main()
2844 $ WS "{"
2845 $ WS "srandom(12);"
2846 $ WS "exit(0);
2847 $ WS "}"
2848 $ CS
2849 $! copy temp.c sys$output
2850 $!
2851 $   DEFINE SYS$ERROR _NLA0:
2852 $   DEFINE SYS$OUTPUT _NLA0:
2853 $   ON ERROR THEN CONTINUE
2854 $   ON WARNING THEN CONTINUE
2855 $   'Checkcc' temp
2856 $   If (Needs_Opt.eqs."Yes")
2857 $   THEN
2858 $     link temp,temp.opt/opt
2859 $   else
2860 $     link temp
2861 $   endif
2862 $   teststatus = f$extract(9,1,$status)
2863 $   DEASSIGN SYS$OUTPUT
2864 $   DEASSIGN SYS$ERROR
2865 $   if (teststatus.nes."1")
2866 $   THEN
2867 $     perl_drand01="(((float)rand())/((float)RAND_MAX))"
2868 $     perl_randseedtype = "unsigned"
2869 $     perl_seedfunc = "srand"
2870 $   ENDIF
2871 $ WRITE_RESULT "drand01 is ''perl_drand01'"
2872 $!
2873 $ set nover
2874 $! Done with compiler checks. Clean up.
2875 $ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
2876 $ if f$search("temp.obj").nes."" then DELETE/NOLOG temp.obj;*
2877 $ if f$search("temp.exe").nes."" then DELETE/NOLOG temp.exe;*
2878 $ if f$search("temp.opt").nes."" then DELETE/NOLOG Temp.opt;*
2879 $!
2880 $!
2881 $! Some that are compiler or VMS version sensitive
2882 $!
2883 $! Gnu C stuff
2884 $ IF "''Using_Gnu_C'".EQS."Yes"
2885 $ THEN
2886 $   perl_d_attribut="define"
2887 $   perl_vms_cc_type="gcc"
2888 $ ELSE
2889 $   perl_d_attribut="undef"
2890 $ ENDIF
2891 $
2892 $! Dec C >= 5.2 and VMS ver >= 7.0
2893 $ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
2894 $ THEN
2895 $ perl_d_bcmp="define"
2896 $ perl_d_gettimeod="define"
2897 $ perl_d_uname="define"
2898 $ perl_d_sigaction="define"
2899 $ perl_d_truncate="define"
2900 $ perl_d_wait4="define"
2901 $ perl_d_index="define"
2902 $ perl_pidtype="pid_t"
2903 $ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"",0"
2904 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
2905 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
2906 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
2907 $perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
2908 $ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"","0"
2909 $ perl_sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
2910 $ perl_sig_num_with_commas=perl_sig_num_init
2911 $ perl_uidtype="uid_t"
2912 $ perl_d_pathconf="define"
2913 $ perl_d_fpathconf="define"
2914 $ perl_d_sysconf="define"
2915 $ perl_d_sigsetjmp="define"
2916 $ ELSE
2917 $ perl_pidtype="unsigned int"
2918 $ perl_d_gettimeod="undef"
2919 $ perl_d_bcmp="undef"
2920 $ perl_d_uname="undef"
2921 $ perl_d_sigaction="undef"
2922 $ perl_d_truncate="undef"
2923 $ perl_d_wait4="undef"
2924 $ perl_d_index="undef"
2925 $ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
2926 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
2927 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
2928 $ perl_sig_name_with_commas = psnwc1 + psnwc2
2929 $ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
2930 $ perl_sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
2931 $ perl_sig_num_with_commas=perl_sig_num_init
2932 $ perl_uidtype="unsigned int"
2933 $ perl_d_pathconf="undef"
2934 $ perl_d_fpathconf="undef"
2935 $ perl_d_sysconf="undef"
2936 $ perl_d_sigsetjmp="undef"
2937 $ ENDIF
2938 $!
2939 $! Dec C alone
2940 $ IF ("''Using_Dec_C'".EQS."Yes")
2941 $ THEN
2942 $ perl_d_mbstowcs="define"
2943 $ perl_d_mbtowc="define"
2944 $ perl_d_stdiobase="define"
2945 $ perl_d_stdio_ptr_lval="define"
2946 $ perl_d_stdio_cnt_lval="define"
2947 $ perl_d_stdstdio="define"
2948 $ perl_d_wcstombs="define"
2949 $ perl_d_mblen="define"
2950 $ perl_d_mktime="define"
2951 $ perl_d_strcoll="define"
2952 $ perl_d_strxfrm="define"
2953 $ perl_d_wctomb="define"
2954 $ perl_i_locale="define"
2955 $ perl_d_locconv="define"
2956 $ perl_d_setlocale="define"
2957 $ perl_vms_cc_type="decc"
2958 $ ELSE
2959 $ perl_d_mbstowcs="undef"
2960 $ perl_d_mbtowc="undef"
2961 $ perl_d_stdiobase="undef"
2962 $ perl_d_stdio_ptr_lval="undef"
2963 $ perl_d_stdio_cnt_lval="undef"
2964 $ perl_d_stdstdio="undef"
2965 $ perl_d_wcstombs="undef"
2966 $ perl_d_mblen="undef"
2967 $ perl_d_mktime="undef"
2968 $ perl_d_strcoll="undef"
2969 $ perl_d_strxfrm="undef"
2970 $ perl_d_wctomb="undef"
2971 $ perl_i_locale="undef"
2972 $ perl_d_locconv="undef"
2973 $ perl_d_setlocale="undef"
2974 $ ENDIF
2975 $!
2976 $! Vax C stuff
2977 $ if ("''Using_Vax_C'".EQS."Yes")
2978 $ THEN
2979 $ perl_vms_cc_type="vaxc"
2980 $ ENDIF
2981 $!
2982 $!
2983 $! Sockets?
2984 $ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
2985 $ THEN
2986 $ perl_d_vms_do_sockets="define"
2987 $ perl_d_htonl="define"
2988 $ perl_d_socket="define"
2989 $ perl_d_select="define"
2990 $ perl_netdb_host_type="char *"
2991 $ perl_netdb_hlen_type="int"
2992 $ perl_netdb_name_type="char *"
2993 $ perl_netdb_net_type="long"
2994 $ perl_d_gethbyaddr="define"
2995 $ perl_d_gethbyname="define"
2996 $ perl_d_getnbyaddr="define"
2997 $ perl_d_getnbyname="define"
2998 $ perl_d_getpbynumber="define"
2999 $ perl_d_getpbyname="define"
3000 $ perl_d_getsbyport="define"
3001 $ perl_d_getsbyname="define"
3002 $ perl_d_gethostprotos="define"
3003 $ perl_d_getnetprotos="define"
3004 $ perl_d_getprotoprotos="define"
3005 $ perl_d_getservprotos="define"
3006 $ ELSE
3007 $ perl_d_vms_do_sockets="undef"
3008 $ perl_d_htonl="undef"
3009 $ perl_d_socket="undef"
3010 $ perl_d_select="undef"
3011 $ perl_netdb_host_type="char *"
3012 $ perl_netdb_hlen_type="int"
3013 $ perl_netdb_name_type="char *"
3014 $ perl_netdb_net_type="long"
3015 $ perl_d_gethbyaddr="undef"
3016 $ perl_d_gethbyname="undef"
3017 $ perl_d_getnbyaddr="undef"
3018 $ perl_d_getnbyname="undef"
3019 $ perl_d_getpbynumber="undef"
3020 $ perl_d_getpbyname="undef"
3021 $ perl_d_getsbyport="undef"
3022 $ perl_d_getsbyname="undef"
3023 $ perl_d_gethostprotos="undef"
3024 $ perl_d_getnetprotos="undef"
3025 $ perl_d_getprotoprotos="undef"
3026 $ perl_d_getservprotos="undef"
3027 $ ENDIF
3028 $! Threads
3029 $ if ("''use_threads'".eqs."T")
3030 $ THEN
3031 $   perl_usethreads="define"
3032 $   perl_d_pthreads_created_joinable="define"
3033 $   if ("''VMS_VER'".ges."7.0")
3034 $   THEN
3035 $     perl_d_oldpthreads="undef"
3036 $   ELSE
3037 $     perl_d_oldpthreads="define"
3038 $   ENDIF
3039 $ ELSE
3040 $   perl_d_oldpthreads="undef"
3041 $   perl_usethreads="undef"
3042 $   
3043 $   perl_d_pthreads_created_joinable="undef"
3044 $ ENDIF
3045 $! 
3046 $! 
3047 $! Finally the composite ones. All config
3048 $ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
3049 $ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
3050 $ perl_myhostname="''myhostname'"
3051 $ perl_mydomain="''mydomain'"
3052 $ perl_perladmin="''perladmin'"
3053 $ perl_cf_email="''cf_email'"
3054 $ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
3055 $ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
3056 $ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
3057 $ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
3058 $ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
3059 $ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
3060 $ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
3061 $ if "''Using_Dec_C'" .eqs. "Yes"
3062 $ THEN
3063 $ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
3064 $ ELSE
3065 $   IF "''Using_Vax_C'" .eqs. "Yes"
3066 $   THEN
3067 $     perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
3068 $   ENDIF
3069 $ ENDIF
3070 $ if use_vmsdebug_perl .eqs. "Y"
3071 $ then
3072 $     perl_optimize="/Debug/NoOpt"
3073 $     perl_dbgprefix = "DBG"
3074 $ else
3075 $     perl_optimize= ""
3076 $     perl_dbgprefix = ""
3077 $ endif
3078 $!
3079 $! Finally clean off any leading zeros from the patchlevel or subversion
3080 $ perl_patchlevel = perl_patchlevel + 0
3081 $ perl_subversion = perl_subversion + 0
3082 $!
3083 $! Okay, we've got everything configured. Now go write out a config.sh.
3084 $ open/write CONFIGSH [-]config.sh
3085 $ WC := "write CONFIGSH"
3086 $!
3087 $ WC "# This file generated by Configure.COM on a VMS system."
3088 $ WC "# Time: " + perl_cf_time
3089 $ WC ""
3090 $ WC "CONFIGDOTSH=true"
3091 $ WC "package='" + perl_package + "'"
3092 $ WC "CONFIG='" + perl_config + "'"
3093 $ WC "cf_time='" + perl_cf_time + "'"
3094 $ WC "cf_by='" + perl_cf_by+ "'"
3095 $ WC "cpp_stuff='" + perl_cpp_stuff + "'"
3096 $ WC "ccdlflags='" + perl_ccdlflags + "'"
3097 $ WC "cccdlflags='" + perl_cccdlflags + "'"
3098 $ WC "mab='" + perl_mab + "'"
3099 $ WC "libpth='" + perl_libpth + "'"
3100 $ WC "ld='" + perl_ld + "'"
3101 $ WC "lddlflags='" + perl_lddlflags + "'"
3102 $ WC "ranlib='" + perl_ranlib + "'"
3103 $ WC "ar='" + perl_ar + "'"
3104 $ WC "eunicefix='" + perl_eunicefix + "'"
3105 $ WC "hint='" + perl_hint +"'"
3106 $ WC "hintfile='" + perl_hintfile + "'"
3107 $ WC "shrplib='" + perl_shrplib + "'"
3108 $ WC "usemymalloc='" + perl_usemymalloc + "'"
3109 $ WC "usevfork='" + perl_usevfork + "'"
3110 $ WC "useposix='false'"
3111 $ WC "spitshell='write sys$output '"
3112 $ WC "dlsrc='dl_vms.c'"
3113 $ WC "binexp='" + perl_binexp + "'"
3114 $ WC "man1ext='" + perl_man1ext + "'"
3115 $ WC "man3ext='" + perl_man3ext + "'"
3116 $ WC "arch='" + perl_arch + "'"
3117 $ WC "archname='" + perl_archname + "'"
3118 $ WC "osvers='" + perl_osvers + "'"
3119 $ WC "prefix='" + perl_prefix + "'"
3120 $ WC "builddir='" + perl_builddir + "'"
3121 $ WC "installbin='" + perl_installbin + "'"
3122 $ WC "installscript='" + perl_installscript + "'"
3123 $ WC "installman1dir='" + perl_installman1dir + "'"
3124 $ WC "installman3dir='" + perl_installman3dir + "'"
3125 $ WC "installprivlib='" + perl_installprivlib + "'"
3126 $ WC "installarchlib='" + perl_installarchlib + "'"
3127 $ WC "installsitelib='" + perl_installsitelib + "'"
3128 $ WC "installsitearch='" + perl_installsitearch + "'"
3129 $ WC "path_sep='" + perl_path_sep + "'"
3130 $ WC "vms_cc_type='" + perl_vms_cc_type + "'"
3131 $ WC "d_attribut='" + perl_d_attribut + "'"
3132 $ WC "cc='" + perl_cc + "'"
3133 $ WC "ccflags='" + perl_ccflags + "'"
3134 $ WC "optimize='" + perl_optimize + "'"
3135 $ WC "dbgprefix='" + perl_dbgprefix + "'"
3136 $ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
3137 $ WC "d_socket='" + perl_d_socket + "'"
3138 $ WC "d_sockpair='" + perl_d_sockpair + "'"
3139 $ WC "d_gethent='" + perl_d_gethent + "'"
3140 $ WC "d_getsent='" + perl_d_getsent + "'"
3141 $ WC "d_select='" + perl_d_select + "'"
3142 $ WC "i_niin='" + perl_i_niin + "'"
3143 $ WC "i_netinettcp='" + perl_i_netinettcp + "'"
3144 $ WC "i_neterrno='" + perl_i_neterrno + "'"
3145 $ WC "d_stdstdio='" + perl_d_stdstdio + "'"
3146 $ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
3147 $ WC "d_stdio_cnt_lval='" + perl_d_stdio_cnt_lval + "'"
3148 $ WC "d_stdiobase='" + perl_d_stdiobase + "'"
3149 $ WC "d_locconv='" + perl_d_locconv + "'"
3150 $ WC "d_setlocale='" + perl_d_setlocale + "'"
3151 $ WC "i_locale='" + perl_i_locale + "'"
3152 $ WC "d_mbstowcs='" + perl_d_mbstowcs + "'"
3153 $ WC "d_mbtowc='" + perl_d_mbtowc + "'"
3154 $ WC "d_wcstombs='" + perl_d_wcstombs + "'"
3155 $ WC "d_wctomb='" + perl_d_wctomb + "'"
3156 $ WC "d_mblen='" + perl_d_mblen + "'"
3157 $ WC "d_mktime='" + perl_d_mktime + "'"
3158 $ WC "d_strcoll='" + perl_d_strcoll + "'"
3159 $ WC "d_strxfrm='" + perl_d_strxfrm  + "'"
3160 $ WC "ldflags='" + perl_ldflags + "'"
3161 $ WC "dlobj='" + perl_dlobj + "'"
3162 $ WC "obj_ext='" + perl_obj_ext + "'"
3163 $ WC "so='" + perl_so + "'"
3164 $ WC "dlext='" + perl_dlext + "'"
3165 $ WC "exe_ext='" + perl_exe_ext + "'"
3166 $ WC "lib_ext='" + perl_lib_ext + "'"
3167 $ WC "myhostname='" + perl_myhostname + "'"
3168 $ WC "mydomain='" + perl_mydomain + "'"
3169 $ WC "perladmin='" + perl_perladmin + "'"
3170 $ WC "cf_email='" + perl_cf_email + "'"
3171 $ WC "myuname='" + perl_myuname + "'"
3172 $ WC "alignbytes='" + perl_alignbytes + "'"
3173 $ WC "osname='" + perl_osname + "'"
3174 $ WC "d_archlib='" + perl_d_archlib + "'"
3175 $ WC "archlibexp='" + perl_archlibexp + "'"
3176 $ WC "archlib='" + perl_archlib + "'"
3177 $ WC "archname='" + perl_archname + "'"
3178 $ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
3179 $ WC "cppstdin='" + perl_cppstdin + "'"
3180 $ WC "cppminus='" + perl_cppminus + "'"
3181 $ WC "d_bcmp='" + perl_d_bcmp + "'"
3182 $ WC "d_bcopy='" + perl_d_bcopy + "'"
3183 $ WC "d_bzero='" + perl_d_bzero + "'"
3184 $ WC "d_castneg='" + perl_d_castneg + "'"
3185 $ WC "castflags='" + perl_castflags + "'"
3186 $ WC "d_chsize='" + perl_d_chsize + "'"
3187 $ WC "d_const='" + perl_d_const + "'"
3188 $ WC "d_crypt='" + perl_d_crypt + "'"
3189 $ WC "byteorder='" + perl_byteorder + "'"
3190 $ WC "full_csh='" + perl_full_csh + "'"
3191 $ WC "d_csh='" + perl_d_csh + "'"
3192 $ WC "d_dup2='" + perl_d_dup2 + "'"
3193 $ WC "d_fchmod='" + perl_d_fchmod + "'"
3194 $ WC "d_fchown='" + perl_d_fchown + "'"
3195 $ WC "d_fcntl='" + perl_d_fcntl + "'"
3196 $ WC "d_fgetpos='" + perl_d_fgetpos + "'"
3197 $ WC "d_flexfnam='" + perl_d_flexfnam + "'"
3198 $ WC "d_flock='" + perl_d_flock + "'"
3199 $ WC "d_fsetpos='" + perl_d_fsetpos + "'"
3200 $ WC "d_gettimeod='" + perl_d_gettimeod + "'"
3201 $ WC "d_getgrps='" + perl_d_getgrps + "'"
3202 $ WC "d_setgrps='" + perl_d_setgrps + "'"
3203 $ WC "d_uname='" + perl_d_uname + "'"
3204 $ WC "d_getprior='" + perl_d_getprior + "'"
3205 $ WC "d_killpg='" + perl_d_killpg + "'"
3206 $ WC "d_link='" + perl_d_link + "'"
3207 $ WC "d_lstat='" + perl_d_lstat + "'"
3208 $ WC "d_lockf='" + perl_d_lockf + "'"
3209 $ WC "d_memcmp='" + perl_d_memcmp + "'"
3210 $ WC "d_memcpy='" + perl_d_memcpy + "'"
3211 $ WC "d_memmove='" + perl_d_memmove + "'"
3212 $ WC "d_memset='" + perl_d_memset + "'"
3213 $ WC "d_mkdir='" + perl_d_mkdir + "'"
3214 $ WC "d_msg='" + perl_d_msg + "'"
3215 $ WC "d_open3='" + perl_d_open3 + "'"
3216 $ WC "d_poll='" + perl_d_poll + "'"
3217 $ WC "d_readdir='" + perl_d_readdir + "'"
3218 $ WC "d_seekdir='" + perl_d_seekdir + "'"
3219 $ WC "d_telldir='" + perl_d_telldir + "'"
3220 $ WC "d_rewinddir='" + perl_d_rewinddir + "'"
3221 $ WC "d_rename='" + perl_d_rename + "'"
3222 $ WC "d_rmdir='" + perl_d_rmdir + "'"
3223 $ WC "d_sem='" + perl_d_sem + "'"
3224 $ WC "d_setegid='" + perl_d_setegid + "'"
3225 $ WC "d_seteuid='" + perl_d_seteuid + "'"
3226 $ WC "d_setprior='" + perl_d_setprior + "'"
3227 $ WC "d_setregid='" + perl_d_setregid + "'"
3228 $ WC "d_setresgid='" + perl_d_setresgid + "'"
3229 $ WC "d_setreuid='" + perl_d_setreuid + "'"
3230 $ WC "d_setresuid='" + perl_d_setresuid + "'"
3231 $ WC "d_setrgid='" + perl_d_setrgid + "'"
3232 $ WC "d_setruid='" + perl_d_setruid + "'"
3233 $ WC "d_setsid='" + perl_d_setsid + "'"
3234 $ WC "d_shm='" + perl_d_shm + "'"
3235 $ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
3236 $ WC "d_sigaction='" + perl_d_sigaction + "'"
3237 $ WC "d_statblks='" + perl_d_statblks + "'"
3238 $ WC "stdio_ptr='" + perl_stdio_ptr + "'"
3239 $ WC "stdio_cnt='" + perl_stdio_cnt + "'"
3240 $ WC "stdio_base='" + perl_stdio_base + "'"
3241 $ WC "stdio_bufsiz='" + perl_stdio_bufsiz + "'"
3242 $ WC "d_strctcpy='" + perl_d_strctcpy + "'"
3243 $ WC "d_strerror='" + perl_d_strerror + "'"
3244 $ WC "d_syserrlst='" + perl_d_syserrlst + "'"
3245 $ WC "d_strerrm='" + perl_d_strerrm + "'"
3246 $ WC "d_symlink='" + perl_d_symlink + "'"
3247 $ WC "d_syscall='" + perl_d_syscall + "'"
3248 $ WC "d_system='" + perl_d_system + "'"
3249 $ WC "timetype='" + perl_timetype + "'"
3250 $ WC "d_truncate='" + perl_d_truncate + "'"
3251 $ WC "d_vfork='" + perl_d_vfork + "'"
3252 $ WC "signal_t='" + perl_signal_t + "'"
3253 $ WC "d_volatile='" + perl_d_volatile + "'"
3254 $ WC "d_vprintf='" + perl_d_vprintf + "'"
3255 $ WC "d_charvspr='" + perl_d_charvspr + "'"
3256 $ WC "d_wait4='" + perl_d_wait4 + "'"
3257 $ WC "d_waitpid='" + perl_d_waitpid + "'"
3258 $ WC "i_dirent='" + perl_i_dirent + "'"
3259 $ WC "d_dirnamlen='" + perl_d_dirnamlen + "'"
3260 $ WC "direntrytype='" + perl_direntrytype + "'"
3261 $ WC "i_fcntl='" + perl_i_fcntl + "'"
3262 $ WC "i_grp='" + perl_i_grp + "'"
3263 $ WC "i_limits='" + perl_i_limits + "'"
3264 $ WC "i_memory='" + perl_i_memory + "'"
3265 $ WC "i_ndbm='" + perl_i_ndbm + "'"
3266 $ WC "i_stdarg='" + perl_i_stdarg + "'"
3267 $ WC "i_pwd='" + perl_i_pwd + "'"
3268 $ WC "d_pwquota='" + perl_d_pwquota + "'"
3269 $ WC "d_pwage='" + perl_d_pwage + "'"
3270 $ WC "d_pwchange='" + perl_d_pwchange + "'"
3271 $ WC "d_pwclass='" + perl_d_pwclass + "'"
3272 $ WC "d_pwexpire='" + perl_d_pwexpire + "'"
3273 $ WC "d_pwcomment='" + perl_d_pwcomment + "'"
3274 $ WC "i_stddef='" + perl_i_stddef + "'"
3275 $ WC "i_stdlib='" + perl_i_stdlib + "'"
3276 $ WC "i_string='" + perl_i_string + "'"
3277 $ WC "i_sysdir='" + perl_i_sysdir + "'"
3278 $ WC "i_sysfile='" + perl_i_sysfile + "'"
3279 $ WC "i_sysioctl='" + perl_i_sysioctl + "'"
3280 $ WC "i_sysndir='" + perl_i_sysndir + "'"
3281 $ WC "i_sysresrc='" + perl_i_sysresrc + "'"
3282 $ WC "i_sysselct='" + perl_i_sysselct + "'"
3283 $ WC "i_dbm='" + perl_i_dbm + "'"
3284 $ WC "i_rpcsvcdbm='" + perl_i_rpcsvcdbm + "'"
3285 $ WC "i_sfio='" + perl_i_sfio + "'"
3286 $ WC "i_sysstat='" + perl_i_sysstat + "'"
3287 $ WC "i_systimes='" + perl_i_systimes + "'"
3288 $ WC "i_systypes='" + perl_i_systypes + "'"
3289 $ WC "i_sysun='" + perl_i_sysun + "'"
3290 $ WC "i_syswait='" + perl_i_syswait + "'"
3291 $ WC "i_termio='" + perl_i_termio + "'"
3292 $ WC "i_sgtty='" + perl_i_sgtty + "'"
3293 $ WC "i_termios='" + perl_i_termios + "'"
3294 $ WC "i_time='" + perl_i_time + "'"
3295 $ WC "i_systime='" + perl_i_systime + "'"
3296 $ WC "i_systimek='" + perl_i_systimek + "'"
3297 $ WC "i_unistd='" + perl_i_unistd + "'"
3298 $ WC "i_utime='" + perl_i_utime + "'"
3299 $ WC "i_varargs='" + perl_i_varargs + "'"
3300 $ WC "i_vfork='" + perl_i_vfork + "'"
3301 $ WC "prototype='" + perl_prototype + "'"
3302 $ WC "randbits='" + perl_randbits +"'"
3303 $ WC "selecttype='" + perl_selecttype + "'"
3304 $ WC "stdchar='" + perl_stdchar + "'"
3305 $ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
3306 $ WC "full_sed='" + perl_full_sed + "'"
3307 $ WC "bin='" + perl_bin + "'"
3308 $ WC "binexp='" + perl_binexp + "'"
3309 $ WC "d_alarm='" + perl_d_alarm + "'"
3310 $ WC "d_casti32='" + perl_d_casti32 + "'"
3311 $ WC "d_chown='" + perl_d_chown + "'"
3312 $ WC "d_chroot='" + perl_d_chroot + "'"
3313 $ WC "d_cuserid='" + perl_d_cuserid + "'"
3314 $ WC "d_dbl_dig='" + perl_d_dbl_dig + "'"
3315 $ WC "d_ldbl_dig='" + perl_d_ldbl_dig + "'"
3316 $ WC "d_difftime='" + perl_d_difftime + "'"
3317 $ WC "d_fork='" + perl_d_fork + "'"
3318 $ WC "d_getlogin='" + perl_d_getlogin + "'"
3319 $ WC "d_getppid='" + perl_d_getppid + "'"
3320 $ WC "d_htonl='" + perl_d_htonl + "'"
3321 $ WC "d_nice='" + perl_d_nice + "'"
3322 $ WC "d_pause='" + perl_d_pause + "'"
3323 $ WC "d_pipe='" + perl_d_pipe + "'"
3324 $ WC "d_readlink='" + perl_d_readlink + "'"
3325 $ WC "d_setlinebuf='" + perl_d_setlinebuf + "'"
3326 $ WC "d_strchr='" + perl_d_strchr + "'"
3327 $ WC "d_index='" + perl_d_index + "'"
3328 $ WC "d_strtod='" + perl_d_strtod + "'"
3329 $ WC "d_strtol='" + perl_d_strtol + "'"
3330 $ WC "d_strtoul='" + perl_d_strtoul + "'"
3331 $ WC "d_tcgetpgrp='" + perl_d_tcgetpgrp + "'"
3332 $ WC "d_tcsetpgrp='" + perl_d_tcsetpgrp + "'"
3333 $ WC "d_times='" + perl_d_times + "'"
3334 $ WC "d_tzname='" + perl_d_tzname + "'"
3335 $ WC "d_umask='" + perl_d_umask + "'"
3336 $ WC "fpostype='" + perl_fpostype + "'"
3337 $ WC "i_dlfcn='" + perl_i_dlfcn + "'"
3338 $ WC "i_float='" + perl_i_float + "'"
3339 $ WC "i_math='" + perl_i_math + "'"
3340 $ WC "intsize='" + perl_intsize + "'"
3341 $ WC "longsize='" + perl_longsize + "'"
3342 $ WC "shortsize='" + perl_shortsize + "'"
3343 $ WC "lseektype='" + perl_lseektype + "'"
3344 $ WC "lseeksize='4'"
3345 $ WC "i_values='" + perl_i_values + "'"
3346 $ WC "malloctype='" + perl_malloctype + "'"
3347 $ WC "freetype='" + perl_freetype + "'"
3348 $ WC "d_mymalloc='" + perl_d_mymalloc + "'"
3349 $ WC "sh='" + perl_sh + "'"
3350 $ WC "sig_name='" + perl_sig_name + "'"
3351 $ WC "sig_num='" + perl_sig_num + "'"
3352 $ tempsym = "sig_name_init='" + perl_sig_name_with_commas + "'"
3353 $ WC/symbol tempsym
3354 $ WC "modetype='" + perl_modetype + "'"
3355 $ WC "ssizetype='" + perl_ssizetype + "'"
3356 $ WC "o_nonblock='" + perl_o_nonblock + "'"
3357 $ WC "eagain='" + perl_eagain + "'"
3358 $ WC "rd_nodata='" + perl_rd_nodata + "'"
3359 $ WC "d_eofnblk='" + perl_d_eofnblk + "'"
3360 $ WC "d_oldarchlib='" + perl_d_oldarchlib + "'"
3361 $ WC "oldarchlibexp='" + perl_oldarchlibexp + "'"
3362 $ WC "oldarchlib='" + perl_oldarchlib + "'"
3363 $ WC "privlibexp='" + perl_privlibexp + "'"
3364 $ WC "privlib='" + perl_privlib + "'"
3365 $ WC "sitelibexp='" + perl_sitelibexp + "'"
3366 $ WC "sitelib='" + perl_sitelib + "'"
3367 $ WC "sitearchexp='" + perl_sitearchexp + "'"
3368 $ WC "sitearch='" + perl_sitearch + "'"
3369 $ WC "sizetype='" + perl_sizetype + "'"
3370 $ WC "i_sysparam='" + perl_i_sysparam + "'"
3371 $ WC "d_void_closedir='" + perl_d_void_closedir + "'"
3372 $ WC "d_dlerror='" + perl_d_dlerror + "'"
3373 $ WC "d_dlsymun='" + perl_d_dlsymun + "'"
3374 $ WC "d_suidsafe='" + perl_d_suidsafe + "'"
3375 $ WC "d_dosuid='" + perl_d_dosuid + "'"
3376 $ WC "d_inetaton='" + perl_d_inetaton + "'"
3377 $ WC "d_isascii='" + perl_d_isascii + "'"
3378 $ WC "d_mkfifo='" + perl_d_mkfifo + "'"
3379 $ WC "d_pathconf='" + perl_d_pathconf + "'"
3380 $ WC "d_fpathconf='" + perl_d_fpathconf + "'"
3381 $ WC "d_safebcpy='" + perl_d_safebcpy + "'"
3382 $ WC "d_safemcpy='" + perl_d_safemcpy + "'"
3383 $ WC "d_sanemcmp='" + perl_d_sanemcmp + "'"
3384 $ WC "d_setpgrp='" + perl_d_setpgrp + "'"
3385 $ WC "d_bsdsetpgrp='" + perl_d_bsdsetpgrp + "'"
3386 $ WC "d_bsdpgrp='" + perl_d_bsdpgrp + "'"
3387 $ WC "d_setpgid='" + perl_d_setpgid + "'"
3388 $ WC "d_setpgrp2='" + perl_d_setpgrp2 + "'"
3389 $ WC "d_sysconf='" + perl_d_sysconf + "'"
3390 $ WC "d_Gconvert='" + perl_d_Gconvert + "'"
3391 $ WC "d_getpgid='" + perl_d_getpgid + "'"
3392 $ WC "d_getpgrp='" + perl_d_getpgrp + "'"
3393 $ WC "d_bsdgetpgrp='" + perl_d_bsdgetpgrp + "'"
3394 $ WC "d_getpgrp2='" + perl_d_getpgrp2 + "'"
3395 $ WC "d_sfio='" + perl_d_sfio + "'"
3396 $ WC "d_sigsetjmp='" + perl_d_sigsetjmp + "'"
3397 $ WC "usedl='" + perl_usedl + "'"
3398 $ WC "startperl=" + perl_startperl ! This one's special--no enclosing single quotes
3399 $ WC "db_hashtype='" + perl_db_hashtype + "'"
3400 $ WC "db_prefixtype='" + perl_db_prefixtype + "'"
3401 $ WC "useperlio='" + perl_useperlio + "'"
3402 $ WC "defvoidused='" + perl_defvoidused + "'"
3403 $ WC "voidflags='" + perl_voidflags + "'"
3404 $ WC "d_eunice='" + perl_d_eunice + "'"
3405 $ WC "libs='" + perl_libs + "'"
3406 $ WC "libc='" + perl_libc + "'"
3407 $ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'"
3408 $ WC tempstring
3409 $ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'"
3410 $ WC tempstring
3411 $ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
3412 $ WC tempstring
3413 $ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
3414 $ WC tempstring
3415 $ WC "pager='" + perl_pager + "'"
3416 $ WC "uidtype='" + perl_uidtype + "'"
3417 $ WC "gidtype='" + perl_gidtype + "'"
3418 $ WC "usethreads='" + perl_usethreads + "'"
3419 $ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
3420 $ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
3421 $ WC "d_gnulibc='" + perl_d_gnulibc + "'"
3422 $ WC "i_netdb='" + perl_i_netdb + "'"
3423 $ WC "pidtype='" + perl_pidtype + "'"
3424 $ WC "netdb_host_type='" + perl_netdb_host_type + "'"
3425 $ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
3426 $ WC "netdb_name_type='" + perl_netdb_name_type + "'"
3427 $ WC "netdb_net_type='" + perl_netdb_net_type + "'"
3428 $ WC "baserev='" + perl_baserev + "'"
3429 $ WC "doublesize='" + perl_doublesize + "'"
3430 $ WC "ptrsize='" + perl_ptrsize + "'"
3431 $ WC "d_gethbyaddr='" + perl_d_gethbyaddr + "'"
3432 $ WC "d_gethbyname='" + perl_d_gethbyname + "'"
3433 $ WC "d_getnbyaddr='" + perl_d_getnbyaddr + "'"
3434 $ WC "d_getnbyname='" + perl_d_getnbyname + "'"
3435 $ WC "d_getpbynumber='" + perl_d_getpbynumber + "'"
3436 $ WC "d_getpbyname='" + perl_d_getpbyname + "'"
3437 $ WC "d_getsbyport='" + perl_d_getsbyport + "'"
3438 $ WC "d_getsbyname='" + perl_d_getsbyname + "'"
3439 $ WC "d_sethent='" + perl_d_sethent + "'"
3440 $ WC "d_oldpthreads='" + perl_d_oldpthreads + "'"
3441 $ WC "d_longdbl='" + perl_d_longdbl + "'"
3442 $ WC "longdblsize='" + perl_longdblsize + "'"
3443 $ WC "d_longlong='" + perl_d_longlong + "'"
3444 $ WC "longlongsize='" + perl_longlongsize + "'"
3445 $ WC "d_mkstemp='" + perl_d_mkstemp + "'"
3446 $ WC "d_setvbuf='" + perl_d_setvbuf + "'"
3447 $ WC "d_setenv='" + perl_d_setenv + "'"
3448 $ WC "d_endhent='" + perl_d_endhent + "'"
3449 $ WC "d_endnent='" + perl_d_endsent + "'"
3450 $ WC "d_endpent='" + perl_d_endpent + "'"
3451 $ WC "d_endsent='" + perl_d_endsent + "'"
3452 $ WC "d_gethent='" + perl_d_gethent + "'"
3453 $ WC "d_getnent='" + perl_d_getsent + "'"
3454 $ WC "d_getpent='" + perl_d_getpent + "'"
3455 $ WC "d_getsent='" + perl_d_getsent + "'"
3456 $ WC "d_sethent='" + perl_d_sethent + "'"
3457 $ WC "d_setnent='" + perl_d_setsent + "'"
3458 $ WC "d_setpent='" + perl_d_setpent + "'"
3459 $ WC "ebcdic='" + perl_ebcdic + "'"
3460 $ WC "d_setsent='" + perl_d_setsent + "'"
3461 $ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
3462 $ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
3463 $ WC "d_getprotoprotos='" + perl_d_getprotoprotos + "'"
3464 $ WC "d_getservprotos='" + perl_d_getservprotos + "'"
3465 $ WC "d_pwgecos='" + perl_d_pwgecos + "'"
3466 $ WC "d_sched_yield='" + perl_d_sched_yield + "'"
3467 $ WC "d_lchown='" + perl_d_lchown + "'"
3468 $ WC "d_union_semun='" + perl_d_union_semun + "'"
3469 $ WC "i_arpainet='" + perl_i_arpainet + "'"
3470 $ WC "d_grpasswd='" + perl_d_grpasswd + "'"
3471 $ WC "d_setgrent='" + perl_d_setgrent + "'"
3472 $ WC "d_getgrent='" + perl_d_getgrent + "'"
3473 $ WC "d_endgrent='" + perl_d_endgrent + "'"
3474 $ WC "d_pwpasswd='" + perl_d_pwpasswd + "'"
3475 $ WC "d_setpwent='" + perl_d_setpwent + "'"
3476 $ WC "d_getpwent='" + perl_d_getpwent + "'"
3477 $ WC "d_endpwent='" + perl_d_endpwent + "'"
3478 $ WC "d_semctl_semun='" + perl_d_semctl_semun + "'"
3479 $ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
3480 $ WC "extensions='" + perl_extensions + "'"
3481 $ WC "d_mknod='" + perl_d_mknod + "'"
3482 $ WC "devtype='" + perl_devtype + "'"
3483 $ WC "d_gethname='" + perl_d_gethname + "'"
3484 $ WC "d_phostname='" + perl_d_phostname + "'"
3485 $ WC "d_accessx='" + perl_d_accessx + "'"
3486 $ WC "d_eaccess='" + perl_d_eaccess + "'"
3487 $ WC "i_sysaccess='" + perl_i_sysaccess + "'"
3488 $ WC "i_syssecrt='" + perl_i_syssecrt + "'"
3489 $ WC "d_fd_set='" + perl_d_fd_set + "'"
3490 $ WC "d_access='" + perl_d_access + "'"
3491 $ WC "d_msg_ctrunc='" + perl_d_msg_ctrunc + "'"
3492 $ WC "d_msg_dontroute='" + perl_d_msg_dontroute + "'"
3493 $ WC "d_msg_oob='" + perl_d_msg_oob + "'"
3494 $ WC "d_msg_peek='" + perl_d_msg_peek + "'"
3495 $ WC "d_msg_proxy='" + perl_d_msg_proxy + "'"
3496 $ WC "d_scm_rights='" + perl_d_scm_rights + "'"
3497 $ WC "d_sendmsg='" + perl_d_sendmsg + "'"
3498 $ WC "d_recvmsg='" + perl_d_recvmsg + "'"
3499 $ WC "d_msghdr_s='" + perl_d_msghdr_s + "'"
3500 $ WC "d_cmsghdr_s='" + perl_d_cmsghdr_s + "'"
3501 $ WC "i_sysuio='" + perl_i_sysuio + "'"
3502 $ WC "d_fseeko='" + perl_d_fseeko + "'"
3503 $ WC "d_ftello='" + perl_d_ftello + "'"
3504 $ WC "d_readv='" + perl_d_readv + "'"
3505 $ WC "d_writev='" + perl_d_writev + "'"
3506 $ WC "i_machcthr='" + perl_i_machcthr + "'"
3507 $ WC "usemultiplicity='" + perl_usemultiplicity + "'"
3508 $ WC "i_poll='" + perl_i_poll + "'"
3509 $ WC "i_inttypes='" + perl_i_inttypes + "'"
3510 $ WC "d_int64t='" + perl_d_int64t + "'"
3511 $ WC "d_off64_t='" + perl_d_off64_t + "'"
3512 $ WC "d_fpos64_t='" + perl_d_fpos64_t + "'"
3513 $ WC "use64bits='" + perl_use64bits + "'"
3514 $ WC "d_drand48proto='" + perl_d_drand48proto + "'"
3515 $ WC "d_old_pthread_create_joinable='" + perl_d_old_pthread_create_joinable + "'"
3516 $ WC "old_pthread_create_joinable='" + perl_old_pthread_create_joinable + "'"
3517 $ WC "drand01='" + perl_drand01 + "'"
3518 $ WC "randseedtype='" + perl_randseedtype + "'"
3519 $ WC "seedfunc='" + perl_seedfunc + "'"
3520 $ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
3521 $ WC "i_sysmount='" + perl_i_sysmount + "'"
3522 $ WC "d_fstatfs='" + perl_d_fstatfs + "'"
3523 $ WC "d_memchr='" + perl_d_memchr + "'"
3524 $ WC "d_statfsflags='" + perl_d_statfsflags + "'"
3525 $ WC "fflushNULL='define'"
3526 $ WC "fflushall='undef'"
3527 $ WC "d_stdio_stream_array='undef'"
3528 $ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
3529 $ WC "i_machcthreads='" + perl_i_machcthreads + "'"
3530 $ WC "i_pthread='" + perl_i_pthread + "'"
3531 $ WC "d_fstatvfs='" + perl_d_fstatvfs + "'"
3532 $ WC "i_mntent='" + perl_i_mntent + "'"
3533 $ WC "d_getmntent='" + perl_d_getmntent + "'"
3534 $ WC "d_hasmntopt='" + perl_d_hasmntopt + "'"
3535 $ WC "d_telldirproto='" + perl_d_telldirproto + "'"
3536 $ WC "d_madvise='" + perl_d_madvise + "'"
3537 $ WC "d_msync='" + perl_d_msync + "'"
3538 $ WC "d_mprotect='" + perl_d_mprotect + "'"
3539 $ WC "d_munmap='" + perl_d_munmap + "'"
3540 $ WC "d_mmap='" + perl_d_mmap + "'"
3541 $ WC "i_sysmman='" + perl_i_sysmman + "'"
3542 $ WC "installusrbinperl='" + perl_installusrbinperl + "'"
3543 $! WC "selectminbits='" + perl_selectminbits + "'"
3544 $ WC "crosscompile='" + perl_crosscompile + "'"
3545 $ WC "multiarch='" + perl_multiarch + "'"
3546 $ WC "sched_yield='" + perl_sched_yield + "'"
3547 $ WC "d_strtoull='" + perl_d_strtoull + "'"
3548 $ WC "usesocks='" + perl_usesocks + "'"
3549 $ WC "d_vendorlib='" + perl_d_vendorlib + "'"
3550 $ WC "vendorlibexp='" + perl_vendorlibexp + "'"
3551 $ WC "d_atolf='" + perl_d_atolf + "'"
3552 $ WC "d_atoll='" + perl_d_atoll + "'"
3553 $ WC "d_bincompat5005='" + perl_d_bincompat + "'"
3554 $ WC "d_endspent='" + perl_d_endspent + "'"
3555 $ WC "d_getspent='" + perl_d_getspent + "'"
3556 $ WC "d_getspnam='" + perl_d_getspnam + "'"
3557 $ WC "d_setspent='" + perl_d_setspent + "'"
3558 $ WC "i_shadow='" + perl_i_shadow + "'"
3559 $ WC "i_socks='" + perl_i_socks + "'"
3560 $ WC "d_PRIfldbl='" + perl_d_PRIfldbl + "'"
3561 $ WC "d_PRIgldbl='" + perl_d_PRIgldbl + "'"
3562 $ WC "d_PRId64='" + perl_d_PRId64 + "'"
3563 $ WC "d_PRIu64='" + perl_d_PRIu64 + "'"
3564 $ WC "d_PRIo64='" + perl_d_PRIo64 + "'"
3565 $ WC "d_PRIx64='" + perl_d_PRIx64 + "'"
3566 $ WC "sPRIfldbl='" + perl_sPRIfldbl + "'"
3567 $ WC "sPRIgldbl='" + perl_sPRIgldbl + "'"
3568 $ WC "sPRId64='" + perl_sPRId64 + "'"
3569 $ WC "sPRIu64='" + perl_sPRIu64 + "'"
3570 $ WC "sPRIo64='" + perl_sPRIo64 + "'"
3571 $ WC "sPRIx64='" + perl_sPRIx64 + "'"
3572 $ WC "d_llseek='" + perl_d_llseek + "'"
3573 $!
3574 $! ##WRITE NEW CONSTANTS HERE##
3575 $!
3576 $ Close CONFIGSH
3577 $
3578 $! Okay, we've gotten here. Build munchconfig and run it
3579 $ 'Perl_CC' munchconfig.c
3580 $ If (Needs_Opt.eqs."Yes")
3581 $ THEN
3582 $   open/write OPTCHAN []munchconfig.opt
3583 $   IF ("''using_gnu_c'".eqs."Yes")
3584 $   THEN
3585 $     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3586 $   endif
3587 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
3588 $   Close OPTCHAN
3589 $   link munchconfig.obj,munchconfig.opt/opt
3590 $   delete munchconfig.opt;*
3591 $ else
3592 $   link munchconfig.obj
3593 $ endif
3594 $ echo ""
3595 $ echo "Writing config.h"
3596 $ !
3597 $ ! we need an fdl file
3598 $ CREATE [-]CONFIG.FDL
3599 RECORD
3600   FORMAT STREAM_LF
3601 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
3602 $ ! First spit out the header info with the local defines (to get
3603 $ ! around the 255 character command line limit)
3604 $ OPEN/APPEND CONFIG [-]config.local
3605 $ if use_debugging_perl.eqs."Y"
3606 $ THEN
3607 $   WRITE CONFIG "#define DEBUGGING"
3608 $ ENDIF
3609 $ if use_two_pot_malloc.eqs."Y"
3610 $ THEN
3611 $    WRITE CONFIG "#define TWO_POT_OPTIMIZE"
3612 $ endif
3613 $ if mymalloc.eqs."Y"
3614 $ THEN
3615 $    WRITE CONFIG "#define EMBEDMYMALLOC"
3616 $ ENDIF
3617 $ if use_pack_malloc.eqs."Y"
3618 $ THEN
3619 $    WRITE CONFIG "#define PACK_MALLOC"
3620 $ endif
3621 $ if use_debugmalloc.eqs."Y"
3622 $ THEN
3623 $    write config "#define DEBUGGING_MSTATS"
3624 $ ENDIF
3625 $ if "''Using_Gnu_C'" .eqs."Yes"
3626 $ THEN
3627 $   WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
3628 $ ENDIF
3629 $ if "''Has_Dec_C_Sockets'".eqs."T"
3630 $ THEN
3631 $    WRITE CONFIG "#define VMS_DO_SOCKETS"
3632 $    WRITE CONFIG "#define DECCRTL_SOCKETS"
3633 $ ENDIF
3634 $ if "''Has_Socketshr'".eqs."T"
3635 $ THEN
3636 $    WRITE CONFIG "#define VMS_DO_SOCKETS"
3637 $ ENDIF
3638 $! This is VMS-specific for now
3639 $ WRITE CONFIG "#''perl_d_setenv' HAS_SETENV"
3640 $ if d_alwdeftype.eqs."Y"
3641 $ THEN
3642 $    WRITE CONFIG "#define SECURE_INTERNAL_GETENV"
3643 $ ELSE
3644 $    WRITE CONFIG "#undef SECURE_INTERNAL_GETENV"
3645 $ ENDIF
3646 $ if d_secintgenv.eqs."Y"
3647 $ THEN
3648 $    WRITE CONFIG "#define ALWAYS_DEFTYPES"
3649 $ ELSE
3650 $    WRITE CONFIG "#undef ALWAYS_DEFTYPES"
3651 $ ENDIF
3652 $ if use_64bit.eqs."Y"
3653 $ THEN
3654 $    WRITE CONFIG "#define USE_LONG_LONG"
3655 $    WRITE CONFIG "#define USE_LONG_DOUBLE"
3656 $ ENDIF
3657 $ WRITE CONFIG "#define HAS_ENVGETENV"
3658 $ CLOSE CONFIG
3659 $!
3660 $! Now build the normal config.h
3661 $ define/user sys$output [-]config.main
3662 $ mcr []munchconfig [-]config.sh [-]config_h.sh
3663 $ ! Concatenate them together
3664 $ copy [-]config.local,[-]config.main [-]config.h
3665 $! Clean up
3666 $ DELETE/NOLOG [-]CONFIG.MAIN;*
3667 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
3668 $ DELETE/NOLOG [-]CONFIG.FDL;*
3669 $!
3670 $ if "''Using_Dec_C'" .eqs."Yes"
3671 $ THEN
3672 $ DECC_REPLACE = "DECC=decc=1"
3673 $ ELSE
3674 $ DECC_REPLACE = "DECC=" 
3675 $ ENDIF
3676 $ if "''Using_Gnu_C'" .eqs."Yes"
3677 $ THEN
3678 $ GNUC_REPLACE = "GNUC=gnuc=1"
3679 $ ELSE
3680 $ GNUC_REPLACE = "GNUC=" 
3681 $ ENDIF
3682 $ if "''Has_Dec_C_Sockets'" .eqs."T"
3683 $ THEN
3684 $   SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
3685 $ ELSE
3686 $   if "''Has_Socketshr'" .eqs."T"
3687 $   THEN
3688 $     SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
3689 $   ELSE
3690 $     SOCKET_REPLACE = "SOCKET="
3691 $   ENDIF
3692 $ ENDIF
3693 $ IF ("''Use_Threads'".eqs."T")
3694 $ THEN
3695 $   if ("''VMS_VER'".LES."6.2")
3696 $   THEN
3697 $     THREAD_REPLACE = "THREAD=OLDTHREADED=1"
3698 $   ELSE
3699 $     THREAD_REPLACE = "THREAD=THREADED=1"
3700 $   ENDIF
3701 $ ELSE
3702 $   THREAD_REPLACE = "THREAD="
3703 $ ENDIF
3704 $ if mymalloc.eqs."Y"
3705 $ THEN
3706 $   MALLOC_REPLACE = "MALLOC=MALLOC=1"
3707 $ ELSE
3708 $   MALLOC_REPLACE = "MALLOC="
3709 $ ENDIF
3710 $ if f$getsyi("HW_MODEL").ge.1024
3711 $ THEN
3712 $ ARCH_TYPE = "ARCH-TYPE=__AXP__"
3713 $ ELSE
3714 $ ARCH_TYPE = "ARCH-TYPE=__VAX__"
3715 $ ENDIF
3716 $ echo "Writing DESCRIP.MMS"
3717 $!set ver
3718 $ define/user sys$output [-]descrip.mms
3719 $ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'"
3720 $ echo "Extracting Build_Ext.Com"
3721 $ Create Sys$Disk:[-]Build_Ext.Com
3722 $ Deck/Dollar="$EndOfTpl$"
3723 $!++ Build_Ext.Com
3724 $!   NOTE: This files is extracted as part of the VMS configuration process.
3725 $!   Any changes made to it directly will be lost.  If you need to make any
3726 $!   changes, please edit the template in [.vms]SubConfigure.Com instead.
3727 $    def = F$Environment("Default")
3728 $    exts1 = F$Edit(p1,"Compress")
3729 $    p2 = F$Edit(p2,"Upcase,Compress,Trim")
3730 $    If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
3731 $    miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
3732 $    makeutil = p3
3733 $    if f$type('p3') .nes. "" then makeutil = 'p3'
3734 $    targ = F$Edit(p4,"Lowercase")
3735 $    i = 0
3736 $ next_ext:
3737 $    ext = F$Element(i," ",p1)
3738 $    If ext .eqs. " " Then Goto done
3739 $    Define/User Perl_Env_Tables CLISYM_LOCAL
3740 $    miniperl
3741      ($extdir = $ENV{'ext'}) =~ s/::/./g;
3742      if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
3743      else                    { $extdir = ".ext.$extdir";   }
3744      ($ENV{'extdir'} = "[$extdir]");
3745      ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
3746 $    Set Default &extdir
3747 $    redesc = 0
3748 $    If F$Locate("clean",targ) .eqs. F$Length(targ)
3749 $    Then
3750 $      Write Sys$Output "Building ''ext' . . ."
3751 $      On Error Then Goto done
3752 $      If F$Search("Descrip.MMS") .eqs. ""
3753 $      Then
3754 $        redesc = 1
3755 $      Else
3756 $        If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
3757             F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
3758 $      EndIf
3759 $    Else
3760 $      Write Sys$Output "''targ'ing ''ext' . . ."
3761 $      On Error Then Continue
3762 $    EndIf
3763 $    If redesc Then -
3764        miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
3765 $    makeutil 'targ'
3766 $    i = i + 1
3767 $    Set Def &def
3768 $    Goto next_ext
3769 $ done:
3770 $    sts = $Status
3771 $    Set Def &def
3772 $    Exit sts
3773 $!-- Build_Ext.Com
3774 $EndOfTpl$
3775 $
3776 $! set nover
3777 $!
3778 $! Clean up after ourselves
3779 $ delete/nolog munchconfig.exe;*
3780 $ delete/nolog munchconfig.obj;*