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