fad6dfc62cddfc20ddd2a05517db2aa3c87aedda
[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 $ Dec_C_Version := "''Dec_C_Version'"
34 $ Dec_C_Version = Dec_C_Version + 0
35 $ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
36 $ perl_extensions := "''extensions'"
37 $ if f$length(Mcc) .eq. 0 then Mcc := "cc"
38 $ MCC = f$edit(mcc, "UPCASE")
39 $ IF Mcc.eqs."CC
40 $ THEN
41 $   C_Compiler_Replace := "CC="
42 $ ELSE
43 $   C_Compiler_Replace := "CC=CC=''Mcc'"
44 $ ENDIF
45 $ if "''Using_Dec_C'" .eqs. "Yes"
46 $ THEN
47 $   Checkcc := "''Mcc'/prefix=all"
48 $ ELSE
49 $   Checkcc := "''Mcc'"
50 $ ENDIF
51 $ cc_flags = ""
52 $! Some constant defaults.
53 $
54 $ hwname = f$getsyi("HW_NAME")
55 $ myname = myhostname
56 $ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
57 $!
58 $! ##ADD NEW CONSTANTS HERE##
59 $ perl_package="''package'"
60 $ perl_baserev = "''baserev'"
61 $ cc_defines=""
62 $ perl_CONFIG="true"
63 $ perl_i_netdb="undef"
64 $ perl_d_gnulibc="undef"
65 $ perl_cf_by="unknown"
66 $ perl_ccdlflags=""
67 $ perl_cccdlflags=""
68 $ perl_mab=""
69 $ perl_libpth="/sys$share /sys$library"
70 $ perl_ld="Link"
71 $ perl_lddlflags="/Share"
72 $ perl_ranlib=""
73 $ perl_ar=""
74 $ perl_eunicefix=":"
75 $ perl_hint="none"
76 $ perl_i_arpainet="undef"
77 $ perl_d_grpasswd="undef"
78 $ perl_d_setgrent="undef"
79 $ perl_d_getgrent="define"
80 $ perl_d_endgrent="define"
81 $ perl_d_pwpasswd="define"
82 $ perl_d_setpwent="define"
83 $ perl_d_getpwent="define"
84 $ perl_d_endpwent="define"
85 $ perl_ebcdic="undef"
86 $ perl_hintfile=""
87 $ perl_shrplib="define"
88 $ perl_usemymalloc=mymalloc
89 $ perl_usevfork="true"
90 $ perl_useposix="false"
91 $ perl_spitshell="write sys$output "
92 $ perl_dlsrc="dl_vms.c"
93 $ perl_man1ext="rno"
94 $ perl_man3ext="rno"
95 $ perl_prefix="perl_root"
96 $ perl_binexp="''perl_prefix':[000000]"
97 $ perl_builddir="''perl_prefix':[000000]"
98 $ perl_installbin="''perl_prefix':[000000]"
99 $ perl_installscript="''perl_prefix':[utils]"
100 $ perl_installman1dir="''perl_prefix':[man.man1]"
101 $ perl_installman3dir="''perl_prefix':[man.man3]"
102 $ perl_installprivlib="''perl_prefix':[lib]"
103 $ perl_installsitelib="''perl_prefix':[lib.site_perl]"
104 $ perl_path_sep="|"
105 $ perl_cc=Mcc
106 $ perl_d_sockpair="undef"
107 $ perl_i_neterrno="define"
108 $ perl_ldflags="/NoTrace/NoMap"
109 $ perl_d_lchown="undef"
110 $ perl_d_mknod="undef"
111 $ perl_d_union_semun="undef"
112 $ perl_d_semctl_semun="undef"
113 $ perl_d_semctl_semid_ds="undef"
114 $ IF (sharedperl.EQS."Y")
115 $ THEN
116 $ perl_obj_ext=".abj"
117 $ perl_so="axe"
118 $ perl_dlext="axe"
119 $ perl_exe_ext=".axe"
120 $ perl_lib_ext=".alb"
121 $ ELSE
122 $ perl_obj_ext=".obj"
123 $ perl_so="exe"
124 $ perl_dlext="exe"
125 $ perl_exe_ext=".exe"
126 $ perl_lib_ext=".olb"
127 $ENDIF
128 $ perl_dlobj="dl_vms''perl_obj_ext'"
129 $ perl_osname="VMS"
130 $ perl_d_archlib="define"
131 $ perl_d_bincompat3="undef"
132 $ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
133 $ perl_cppminus=""
134 $ perl_d_castneg="define"
135 $ perl_castflags="0"
136 $ perl_d_chsize="undef"
137 $ perl_d_const="define"
138 $ perl_d_crypt="define"
139 $ perl_byteorder="1234"
140 $ perl_full_csh=""
141 $ perl_d_csh="undef"
142 $ perl_d_dup2="define"
143 $ perl_d_fchmod="undef"
144 $ perl_d_fchown="undef"
145 $ perl_d_fcntl="undef"
146 $ perl_d_fgetpos="define"
147 $ perl_d_flexfnam="define"
148 $ perl_d_flock="undef"
149 $ perl_d_fsetpos="define"
150 $ perl_d_getgrps="undef"
151 $ perl_d_setgrps="undef"
152 $ perl_d_getprior="undef"
153 $ perl_d_killpg="undef"
154 $ perl_d_link="undef"
155 $ perl_d_lstat="undef"
156 $ perl_d_lockf="undef"
157 $ perl_d_memcmp="define"
158 $ perl_d_memcpy="define"
159 $ perl_d_memmove="define"
160 $ perl_d_memset="define"
161 $ perl_d_mkdir="define"
162 $ perl_d_msg="undef"
163 $ perl_d_open3="define"
164 $ perl_d_poll="undef"
165 $ perl_d_readdir="define"
166 $ perl_d_seekdir="define"
167 $ perl_d_telldir="define"
168 $ perl_d_rewinddir="define"
169 $ perl_d_rename="define"
170 $ perl_d_rmdir="define"
171 $ perl_d_sem="undef"
172 $ perl_d_setegid="undef"
173 $ perl_d_seteuid="undef"
174 $ perl_d_setprior="undef"
175 $ perl_d_setregid="undef"
176 $ perl_d_setresgid="undef"
177 $ perl_d_setreuid="undef"
178 $ perl_d_setresuid="undef"
179 $ perl_d_setrgid="undef"
180 $ perl_d_setruid="undef"
181 $ perl_d_setsid="undef"
182 $ perl_d_shm="undef"
183 $ perl_d_shmatprototype="undef"
184 $ perl_d_statblks="undef"
185 $ perl_stdio_ptr="((*fp)->_ptr)"
186 $ perl_stdio_cnt="((*fp)->_cnt)"
187 $ perl_stdio_base="((*fp)->_base)"
188 $ perl_stdio_bufsiz="((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)"
189 $ perl_d_strctcpy="define"
190 $ perl_d_strerror="define"
191 $ perl_d_syserrlst="undef"
192 $ perl_d_strerrm="strerror((e),vaxc$errno)"
193 $ perl_d_symlink="undef"
194 $ perl_d_syscall="undef"
195 $ perl_d_system="define"
196 $ perl_timetype="time_t"
197 $ perl_d_vfork="define"
198 $ perl_signal_t="void"
199 $ perl_d_volatile="define"
200 $ perl_d_vprintf="define"
201 $ perl_d_charvspr="undef"
202 $ perl_d_waitpid="define"
203 $ perl_i_dirent="undef"
204 $ perl_d_dirnamlen="define"
205 $ perl_direntrytype="struct dirent"
206 $ perl_i_fcntl="undef"
207 $ perl_i_grp="undef"
208 $ perl_i_limits="define"
209 $ perl_i_memory="undef"
210 $ perl_i_ndbm="undef"
211 $ perl_i_stdarg="define"
212 $ perl_i_pwd="undef"
213 $ perl_d_pwquota="undef"
214 $ perl_d_pwage="undef"
215 $ perl_d_pwchange="undef"
216 $ perl_d_pwclass="undef"
217 $ perl_d_pwexpire="undef"
218 $ perl_d_pwcomment="define"
219 $ perl_i_stddef="define"
220 $ perl_i_stdlib="define"
221 $ perl_i_string="define"
222 $ perl_i_sysdir="undef"
223 $ perl_i_sysfile="undef"
224 $ perl_i_sysioctl="undef"
225 $ perl_i_sysndir="undef"
226 $ perl_i_sysresrc="undef"
227 $ perl_i_sysselct="undef"
228 $ perl_i_dbm="undef"
229 $ perl_i_rpcsvcdbm="undef"
230 $ perl_i_sfio="undef"
231 $ perl_i_sysstat="define"
232 $ perl_i_systimes="undef"
233 $ perl_i_systypes="define"
234 $ perl_i_sysun="undef"
235 $ perl_i_syswait="undef"
236 $ perl_i_termio="undef"
237 $ perl_i_sgtty="undef"
238 $ perl_i_termios="undef"
239 $ perl_i_time="define"
240 $ perl_i_systime="undef"
241 $ perl_i_systimek="undef"
242 $! perl_i_unistd="undef"
243 $ perl_i_utime="undef"
244 $ perl_i_varargs="undef"
245 $ perl_i_vfork="undef"
246 $ perl_prototype="define"
247 $ perl_randbits="31"
248 $ perl_stdchar="char"
249 $ perl_d_unlink_all_versions="undef"
250 $ perl_full_sed="_NLA0:"
251 $ perl_bin="/''perl_prefix'/000000"
252 $ perl_binexp="''perl_prefix':[000000]"
253 $ perl_d_alarm="define"
254 $ perl_d_casti32="define"
255 $ perl_d_chown="define"
256 $ perl_d_chroot="undef"
257 $ perl_d_cuserid="define"
258 $ perl_d_dbl_dig="define"
259 $ perl_d_difftime="define"
260 $ perl_d_fork="undef"
261 $ perl_d_getlogin="define"
262 $ perl_d_getppid="undef"
263 $ perl_d_nice="define"
264 $ perl_d_pause="define"
265 $ perl_d_pipe="define"
266 $ perl_d_readlink="undef"
267 $ perl_d_setlinebuf="undef"
268 $ perl_d_strchr="define"
269 $ perl_d_strtod="define"
270 $ perl_d_strtol="define"
271 $ perl_d_strtoul="define"
272 $ perl_d_tcgetpgrp="undef"
273 $ perl_d_tcsetpgrp="undef"
274 $ perl_d_times="define"
275 $ perl_d_tzname="undef"
276 $ perl_d_umask="define"
277 $ perl_fpostype="fpos_t"
278 $ perl_i_dlfcn="undef"
279 $ perl_i_float="define"
280 $ perl_i_math="define"
281 $ perl_lseektype="int"
282 $ perl_i_values="undef"
283 $ perl_malloctype="void *"
284 $ perl_freetype="void"
285 $ if "''mymalloc'".eqs."Y"
286 $ THEN
287 $ perl_d_mymalloc="define"
288 $ ELSE
289 $ perl_d_mymalloc="undef"
290 $ENDIF
291 $ perl_sh="MCR"
292 $ perl_modetype="unsigned int"
293 $ perl_ssizetype="int"
294 $ perl_o_nonblock=""
295 $ perl_eagain=""
296 $ perl_rd_nodata=""
297 $ perl_d_eofnblk="undef"
298 $ perl_d_oldarchlib="define"
299 $ perl_privlibexp="''perl_prefix':[lib]"
300 $ perl_privlib="''perl_prefix':[lib]"
301 $ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
302 $ perl_sitelib="''perl_prefix':[lib.site_perl]"
303 $ perl_sizetype="size_t"
304 $ perl_i_sysparam="undef"
305 $ perl_d_void_closedir="define"
306 $ perl_d_dlerror="undef"
307 $ perl_d_dlsymun="undef"
308 $ perl_d_suidsafe="undef"
309 $ perl_d_dosuid="undef"
310 $ perl_d_inetaton="undef"
311 $ perl_d_isascii="define"
312 $ perl_d_mkfifo="undef"
313 $ perl_d_safebcpy="undef"
314 $ perl_d_safemcpy="define"
315 $ perl_d_sanemcmp="define"
316 $ perl_d_setpgrp="undef"
317 $ perl_d_bsdsetpgrp="undef"
318 $ perl_d_bsdpgrp="undef"
319 $ perl_d_setpgid="undef"
320 $ perl_d_setpgrp2="undef"
321 $ perl_d_Gconvert="my_gconvert(x,n,t,b)"
322 $ perl_d_getpgid="undef"
323 $ perl_d_getpgrp="undef"
324 $ perl_d_bsdgetpgrp="undef"
325 $ perl_d_getpgrp2="undef"
326 $ perl_d_sfio="undef"
327 $ perl_usedl="define"
328 $ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'  !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
329 $ perl_db_hashtype=""
330 $ perl_db_prefixtype=""
331 $ perl_useperlio="undef"
332 $ perl_defvoidused="15"
333 $ perl_voidflags="15"
334 $ perl_d_eunice="undef"
335 $ perl_d_pwgecos="define"
336 $ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
337 $ THEN
338 $ 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"
339 $ ELSE
340 $ perl_libs=""
341 $ ENDIF
342 $ IF ("''Using_Dec_C'".eqs."Yes")
343 $ THEN
344 $ perl_libc="(DECCRTL)"
345 $ ELSE
346 $ perl_libc=""
347 $ ENDIF
348 $ perl_PATCHLEVEL="''patchlevel'"
349 $ perl_SUBVERSION="''subversion'"
350 $ perl_pager="most"
351 $!
352 $!
353 $! Now some that we build up
354 $!
355 $ LocalTime = f$time()
356 $ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + - 
357                 f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
358                 " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
359                 " " + f$cvtime(LocalTime,, "YEAR")
360 $ if f$getsyi("HW_MODEL").ge.1024
361 $ THEN
362 $ perl_arch="VMS_AXP"
363 $ perl_archname="VMS_AXP"
364 $ perl_alignbytes="8"
365 $ ELSE
366 $ perl_arch="VMS_VAX"
367 $ perl_archname="VMS_VAX"
368 $ perl_alignbytes="8"
369 $ ENDIF
370 $ if ("''Use_Threads'".eqs."T")
371 $ THEN
372 $ perl_arch = "''perl_arch'-thread"
373 $ perl_archname = "''perl_archname'-thread"
374 $ ENDIF
375 $ perl_osvers=f$edit(osvers, "TRIM")
376 $ if (perl_subversion + 0).eq.0
377 $ THEN
378 $ LocalPerlVer = "5_" + Perl_PATCHLEVEL
379 $ ELSE
380 $ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
381 $ ENDIF
382 $!
383 $! Some that we need to invoke the compiler for
384 $ OS := "open/write SOURCECHAN []temp.c"
385 $ WS := "write SOURCECHAN"
386 $ CS := "close SOURCECHAN"
387 $ DS := "delete/nolog []temp.*;*"
388 $ Needs_Opt := "No"
389 $ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
390 $ THEN
391 $   open/write OPTCHAN []temp.opt
392 $   IF ("''using_gnu_c'".eqs."Yes")
393 $   THEN
394 $     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
395 $   endif
396 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
397 $   Close OPTCHAN
398 $   Needs_Opt := "Yes"
399 $ ENDIF
400 $!
401 $! Check for __STDC__
402 $!
403 $ OS
404 $ WS "#ifdef __DECC
405 $ WS "#include <stdlib.h>
406 $ WS "#endif
407 $ WS "#include <stdio.h>
408 $ WS "int main()
409 $ WS "{"
410 $ WS "#ifdef __STDC__
411 $ WS "printf(""42\n"");
412 $ WS "#else
413 $ WS "printf(""1\n"");
414 $ WS "#endif
415 $ WS "exit(0);
416 $ WS "}"
417 $ CS
418 $   DEFINE SYS$ERROR _NLA0:
419 $   DEFINE SYS$OUTPUT _NLA0:
420 $   ON ERROR THEN CONTINUE
421 $   ON WARNING THEN CONTINUE
422 $   'Checkcc' temp.c
423 $   If (Needs_Opt.eqs."Yes")
424 $   THEN
425 $     link temp.obj,temp.opt/opt
426 $   else
427 $     link temp.obj
428 $   endif
429 $   DEASSIGN SYS$OUTPUT
430 $   DEASSIGN SYS$ERROR
431 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
432 $   DEFINE SYS$ERROR TEMPOUT
433 $   DEFINE SYS$OUTPUT TEMPOUT
434 $   mcr []temp
435 $   CLOSE TEMPOUT
436 $   DEASSIGN SYS$OUTPUT
437 $   DEASSIGN SYS$ERROR
438 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
439 $   READ TEMPOUT line
440 $   CLOSE TEMPOUT
441
442 $ perl_cpp_stuff=line
443 $ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
444 $!
445 $! Check for double size
446 $!
447 $ OS
448 $ WS "#ifdef __DECC
449 $ WS "#include <stdlib.h>
450 $ WS "#endif
451 $ WS "#include <stdio.h>
452 $ WS "int main()
453 $ WS "{"
454 $ WS "int foo;
455 $ WS "foo = sizeof(double);
456 $ WS "printf(""%d\n"", foo);
457 $ WS "exit(0);
458 $ WS "}"
459 $ CS
460 $   DEFINE SYS$ERROR _NLA0:
461 $   DEFINE SYS$OUTPUT _NLA0:
462 $   ON ERROR THEN CONTINUE
463 $   ON WARNING THEN CONTINUE
464 $   'Checkcc' temp.c
465 $   If (Needs_Opt.eqs."Yes")
466 $   THEN
467 $     link temp.obj,temp.opt/opt
468 $   else
469 $     link temp.obj
470 $   endif
471 $!   link temp.obj
472 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
473 $   DEASSIGN SYS$OUTPUT
474 $   DEASSIGN SYS$ERROR
475 $   DEFINE SYS$ERROR TEMPOUT
476 $   DEFINE SYS$OUTPUT TEMPOUT
477 $   mcr []temp
478 $   CLOSE TEMPOUT
479 $   DEASSIGN SYS$OUTPUT
480 $   DEASSIGN SYS$ERROR
481 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
482 $   READ TEMPOUT line
483 $   CLOSE TEMPOUT
484
485 $ perl_doublesize=line
486 $ WRITE_RESULT "doublesize is ''perl_doublesize'"
487 $!
488 $! Check for long double size
489 $!
490 $ OS
491 $ WS "#ifdef __DECC
492 $ WS "#include <stdlib.h>
493 $ WS "#endif
494 $ WS "#include <stdio.h>
495 $ WS "int main()
496 $ WS "{"
497 $ WS "printf(""%d\n"", sizeof(long double));
498 $ WS "exit(0);
499 $ WS "}"
500 $ CS
501 $   DEFINE SYS$ERROR _NLA0:
502 $   DEFINE SYS$OUTPUT _NLA0:
503 $   ON ERROR THEN CONTINUE
504 $   ON WARNING THEN CONTINUE
505 $   'Checkcc' temp.c
506 $   teststatus = f$extract(9,1,$status)
507 $   if (teststatus.nes."1")
508 $   THEN
509 $     perl_longdblsize="0"
510 $     perl_d_longdbl="undef"
511 $   ELSE
512 $     ON ERROR THEN CONTINUE
513 $     ON WARNING THEN CONTINUE
514 $     If (Needs_Opt.eqs."Yes")
515 $     THEN
516 $     link temp.obj,temp.opt/opt
517 $     else
518 $       link temp.obj
519 $     endif
520 $     teststatus = f$extract(9,1,$status)
521 $     DEASSIGN SYS$OUTPUT
522 $     DEASSIGN SYS$ERROR
523 $     if (teststatus.nes."1")
524 $     THEN
525 $       perl_longdblsize="0"
526 $       perl_d_longdbl="undef"
527 $     ELSE
528 $       OPEN/WRITE TEMPOUT [-.uu]tempout.lis
529 $       DEFINE SYS$ERROR TEMPOUT
530 $       DEFINE SYS$OUTPUT TEMPOUT
531 $       mcr []temp
532 $       CLOSE TEMPOUT
533 $       DEASSIGN SYS$OUTPUT
534 $       DEASSIGN SYS$ERROR
535 $       OPEN/READ TEMPOUT [-.uu]tempout.lis
536 $       READ TEMPOUT line
537 $       CLOSE TEMPOUT
538
539 $       perl_longdblsize=line
540 $       perl_d_longdbl="define"
541 $     ENDIF
542 $   ENDIF
543 $ WRITE_RESULT "longdblsize is ''perl_longdblsize'"
544 $ WRITE_RESULT "d_longdbl is ''perl_d_longdbl'"
545 $!
546 $! Check for long long existance and size
547 $!
548 $ OS
549 $ WS "#ifdef __DECC
550 $ WS "#include <stdlib.h>
551 $ WS "#endif
552 $ WS "#include <stdio.h>
553 $ WS "int main()
554 $ WS "{"
555 $ WS "printf(""%d\n"", sizeof(long long));
556 $ WS "exit(0);
557 $ WS "}"
558 $ CS
559 $   DEFINE SYS$ERROR _NLA0:
560 $   DEFINE SYS$OUTPUT _NLA0:
561 $   on error then continue
562 $   on warning then continue
563 $   'Checkcc' temp.c
564 $   If (Needs_Opt.eqs."Yes")
565 $   THEN
566 $     link temp.obj,temp.opt/opt
567 $   else
568 $     link temp.obj
569 $   endif
570 $   teststatus = f$extract(9,1,$status)
571 $   DEASSIGN SYS$OUTPUT
572 $   DEASSIGN SYS$ERROR
573 $   if (teststatus.nes."1")
574 $   THEN
575 $     perl_longlongsize="0"
576 $     perl_d_longlong="undef"
577 $   ELSE
578 $     OPEN/WRITE TEMPOUT [-.uu]tempout.lis
579 $     DEFINE SYS$ERROR TEMPOUT
580 $     DEFINE SYS$OUTPUT TEMPOUT
581 $     mcr []temp
582 $     CLOSE TEMPOUT
583 $     DEASSIGN SYS$OUTPUT
584 $     DEASSIGN SYS$ERROR
585 $     OPEN/READ TEMPOUT [-.uu]tempout.lis
586 $     READ TEMPOUT line
587 $     CLOSE TEMPOUT
588
589 $     perl_longlongsize=line
590 $     perl_d_longlong="define"
591 $   ENDIF
592 $ WRITE_RESULT "longlongsize is ''perl_longlongsize'"
593 $ WRITE_RESULT "d_longlong is ''perl_d_longlong'"
594 $!
595 $! Check for int size
596 $!
597 $ OS
598 $ WS "#ifdef __DECC
599 $ WS "#include <stdlib.h>
600 $ WS "#endif
601 $ WS "#include <stdio.h>
602 $ WS "int main()
603 $ WS "{"
604 $ WS "printf(""%d\n"", sizeof(int));
605 $ WS "exit(0);
606 $ WS "}"
607 $ CS
608 $   DEFINE SYS$ERROR _NLA0:
609 $   DEFINE SYS$OUTPUT _NLA0:
610 $   on error then continue
611 $   on warning then continue
612 $   'Checkcc' temp.c
613 $   If (Needs_Opt.eqs."Yes")
614 $   THEN
615 $     link temp.obj,temp.opt/opt
616 $   else
617 $     link temp.obj
618 $   endif
619 $   If (Needs_Opt.eqs."Yes")
620 $   THEN
621 $     link temp.obj,temp.opt/opt
622 $   else
623 $     link temp.obj
624 $   endif
625 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
626 $   DEASSIGN SYS$OUTPUT
627 $   DEASSIGN SYS$ERROR
628 $   DEFINE SYS$ERROR TEMPOUT
629 $   DEFINE SYS$OUTPUT TEMPOUT
630 $   mcr []temp
631 $   CLOSE TEMPOUT
632 $   DEASSIGN SYS$OUTPUT
633 $   DEASSIGN SYS$ERROR
634 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
635 $   READ TEMPOUT line
636 $   CLOSE TEMPOUT
637
638 $   perl_intsize=line
639 $ WRITE_RESULT "intsize is ''perl_intsize'"
640 $!
641 $! Check for short size
642 $!
643 $ OS
644 $ WS "#ifdef __DECC
645 $ WS "#include <stdlib.h>
646 $ WS "#endif
647 $ WS "#include <stdio.h>
648 $ WS "int main()
649 $ WS "{"
650 $ WS "printf(""%d\n"", sizeof(short));
651 $ WS "exit(0);
652 $ WS "}"
653 $ CS
654 $   DEFINE SYS$ERROR _NLA0:
655 $   DEFINE SYS$OUTPUT _NLA0:
656 $   on error then continue
657 $   on warning then continue
658 $   'Checkcc' temp.c
659 $   If (Needs_Opt.eqs."Yes")
660 $   THEN
661 $     link temp.obj,temp.opt/opt
662 $   else
663 $     link temp.obj
664 $   endif
665 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
666 $   DEASSIGN SYS$OUTPUT
667 $   DEASSIGN SYS$ERROR
668 $   DEFINE SYS$ERROR TEMPOUT
669 $   DEFINE SYS$OUTPUT TEMPOUT
670 $   mcr []temp
671 $   CLOSE TEMPOUT
672 $   DEASSIGN SYS$OUTPUT
673 $   DEASSIGN SYS$ERROR
674 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
675 $   READ TEMPOUT line
676 $   CLOSE TEMPOUT
677
678 $   perl_shortsize=line
679 $ WRITE_RESULT "shortsize is ''perl_shortsize'"
680 $!
681 $! Check for long size
682 $!
683 $ OS
684 $ WS "#ifdef __DECC
685 $ WS "#include <stdlib.h>
686 $ WS "#endif
687 $ WS "#include <stdio.h>
688 $ WS "int main()
689 $ WS "{"
690 $ WS "int foo;
691 $ WS "foo = sizeof(long);
692 $ WS "printf(""%d\n"", foo);
693 $ WS "exit(0);
694 $ WS "}"
695 $ CS
696 $   DEFINE SYS$ERROR _NLA0:
697 $   DEFINE SYS$OUTPUT _NLA0:
698 $   on error then continue
699 $   on warning then continue
700 $   'Checkcc' temp.c
701 $   If (Needs_Opt.eqs."Yes")
702 $   THEN
703 $     link temp.obj,temp.opt/opt
704 $   else
705 $     link temp.obj
706 $   endif
707 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
708 $   DEASSIGN SYS$OUTPUT
709 $   DEASSIGN SYS$ERROR
710 $   DEFINE SYS$ERROR TEMPOUT
711 $   DEFINE SYS$OUTPUT TEMPOUT
712 $   mcr []temp
713 $   CLOSE TEMPOUT
714 $   DEASSIGN SYS$OUTPUT
715 $   DEASSIGN SYS$ERROR
716 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
717 $   READ TEMPOUT line
718 $   CLOSE TEMPOUT
719
720 $   perl_longsize=line
721 $ WRITE_RESULT "longsize is ''perl_longsize'"
722 $!
723 $! Check the prototype for getgid
724 $!
725 $ OS
726 $ WS "#ifdef __DECC
727 $ WS "#include <stdlib.h>
728 $ WS "#endif
729 $ WS "#include <stdio.h>
730 $ WS "#include <types.h>
731 $ WS "#include <unistd.h>
732 $ WS "int main()
733 $ WS "{"
734 $ WS "gid_t foo;
735 $ WS "exit(0);
736 $ WS "}"
737 $ CS
738 $   DEFINE SYS$ERROR _NLA0:
739 $   DEFINE SYS$OUTPUT _NLA0:
740 $   on error then continue
741 $   on warning then continue
742 $   'Checkcc' temp.c
743 $   teststatus = f$extract(9,1,$status)
744 $   DEASSIGN SYS$OUTPUT
745 $   DEASSIGN SYS$ERROR
746 $   if (teststatus.nes."1")
747 $   THEN
748 $!   Okay, gid_t failed. Must be unsigned int
749 $     perl_gidtype = "unsigned int"
750 $   ELSE
751 $     perl_gidtype = "gid_t"
752 $   ENDIF
753 $ WRITE_RESULT "Gid_t is ''perl_gidtype'"
754 $!
755 $! Check to see if we've got dev_t
756 $!
757 $ OS
758 $ WS "#ifdef __DECC
759 $ WS "#include <stdlib.h>
760 $ WS "#endif
761 $ WS "#include <stdio.h>
762 $ WS "#include <types.h>
763 $ WS "#include <unistd.h>
764 $ WS "int main()
765 $ WS "{"
766 $ WS "dev_t foo;
767 $ WS "exit(0);
768 $ WS "}"
769 $ CS
770 $   DEFINE SYS$ERROR _NLA0:
771 $   DEFINE SYS$OUTPUT _NLA0:
772 $   on error then continue
773 $   on warning then continue
774 $   'Checkcc' temp.c
775 $   teststatus = f$extract(9,1,$status)
776 $   DEASSIGN SYS$OUTPUT
777 $   DEASSIGN SYS$ERROR
778 $   if (teststatus.nes."1")
779 $   THEN
780 $!   Okay, dev_t failed. Must be unsigned int
781 $     perl_devtype = "unsigned int"
782 $   ELSE
783 $     perl_devtype = "dev_t"
784 $   ENDIF
785 $ WRITE_RESULT "Dev_t is ''perl_devtype'"
786 $!
787 $! Check to see if we've got unistd.h (which we ought to, but you never know)
788 $!
789 $ OS
790 $ WS "#ifdef __DECC
791 $ WS "#include <stdlib.h>
792 $ WS "#endif
793 $ WS "#include <unistd.h>
794 $ WS "int main()
795 $ WS "{"
796 $ WS "exit(0);
797 $ WS "}"
798 $ CS
799 $   DEFINE SYS$ERROR _NLA0:
800 $   DEFINE SYS$OUTPUT _NLA0:
801 $   on error then continue
802 $   on warning then continue
803 $   'Checkcc' temp.c
804 $   teststatus = f$extract(9,1,$status)
805 $   DEASSIGN SYS$OUTPUT
806 $   DEASSIGN SYS$ERROR
807 $   if (teststatus.nes."1")
808 $   THEN
809 $!   Okay, failed. Must not have it
810 $     perl_i_unistd = "undef"
811 $   ELSE
812 $     perl_i_unistd = "define"
813
814 $   ENDIF
815 $ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
816 $!
817 $! Check the prototype for select
818 $!
819 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
820 $ THEN
821 $ OS
822 $ WS "#ifdef __DECC
823 $ WS "#include <stdlib.h>
824 $ WS "#endif
825 $ WS "#include <stdio.h>
826 $ WS "#include <types.h>
827 $ WS "#include <unistd.h>
828 $ if ("''Has_Socketshr'".eqs."T")
829 $ THEN
830 $  WS "#include <socketshr.h>"
831 $ else
832 $  WS "#include <time.h>
833 $  WS "#include <socket.h>
834 $ endif
835 $ WS "int main()
836 $ WS "{"
837 $ WS "fd_set *foo;
838 $ WS "int bar;
839 $ WS "foo = NULL;
840 $ WS "bar = select(2, foo, foo, foo, NULL);
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, fd_set failed. Must be an int
855 $     perl_selecttype = "int *"
856 $   ELSE
857 $     perl_selecttype="fd_set *"
858 $   ENDIF
859 $ ELSE
860 $   ! No sockets, so stick in an int *
861 $   perl_selecttype = "int *"
862 $ ENDIF
863 $ WRITE_RESULT "selectype is ''perl_selecttype'"
864 $!
865 $! Check for sys/file.h
866 $!
867 $ OS
868 $ WS "#ifdef __DECC
869 $ WS "#include <stdlib.h>
870 $ WS "#endif
871 $ WS "#include <stdio.h>
872 $ WS "#include <unistd.h>
873 $ WS "#include <sys/file.h>
874 $ WS "int main()
875 $ WS "{"
876 $ WS "exit(0);
877 $ WS "}"
878 $ CS
879 $   DEFINE SYS$ERROR _NLA0:
880 $   DEFINE SYS$OUTPUT _NLA0:
881 $   on error then continue
882 $   on warning then continue
883 $   'Checkcc' temp.c
884 $   savedstatus = $status
885 $   teststatus = f$extract(9,1,savedstatus)
886 $   if (teststatus.nes."1")
887 $   THEN
888 $     perl_i_sysfile="undef"
889 $     DEASSIGN SYS$OUTPUT
890 $     DEASSIGN SYS$ERROR
891 $   ELSE
892 $     If (Needs_Opt.eqs."Yes")
893 $     THEN
894 $       link temp.obj,temp.opt/opt
895 $     else
896 $       link temp.obj
897 $     endif
898 $     savedstatus = $status
899 $     teststatus = f$extract(9,1,savedstatus)
900 $     DEASSIGN SYS$OUTPUT
901 $     DEASSIGN SYS$ERROR
902 $     if (teststatus.nes."1")
903 $     THEN
904 $       perl_i_sysfile="undef"
905 $     ELSE
906 $       perl_i_sysfile="define"
907 $     ENDIF
908 $   ENDIF
909 $ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
910 $!
911 $! Check for fcntl.h
912 $!
913 $ OS
914 $ WS "#ifdef __DECC
915 $ WS "#include <stdlib.h>
916 $ WS "#endif
917 $ WS "#include <stdio.h>
918 $ WS "#include <unistd.h>
919 $ WS "#include <fcntl.h>
920 $ WS "int main()
921 $ WS "{"
922 $ WS "exit(0);
923 $ WS "}"
924 $ CS
925 $   DEFINE SYS$ERROR _NLA0:
926 $   DEFINE SYS$OUTPUT _NLA0:
927 $   on error then continue
928 $   on warning then continue
929 $   'Checkcc' temp.c
930 $   savedstatus = $status
931 $   teststatus = f$extract(9,1,savedstatus)
932 $   if (teststatus.nes."1")
933 $   THEN
934 $     perl_i_fcntl="undef"
935 $     DEASSIGN SYS$OUTPUT
936 $     DEASSIGN SYS$ERROR
937 $   ELSE
938 $     If (Needs_Opt.eqs."Yes")
939 $     THEN
940 $       link temp.obj,temp.opt/opt
941 $     else
942 $       link temp.obj
943 $     endif
944 $     savedstatus = $status
945 $     teststatus = f$extract(9,1,savedstatus)
946 $     DEASSIGN SYS$OUTPUT
947 $     DEASSIGN SYS$ERROR
948 $     if (teststatus.nes."1")
949 $     THEN
950 $       perl_i_fcntl="undef"
951 $     ELSE
952 $       perl_i_fcntl="define"
953 $     ENDIF
954 $   ENDIF
955 $ WRITE_RESULT "i_fcntl is ''perl_i_fcntl'"
956 $!
957 $! Check for fcntl
958 $!
959 $ OS
960 $ WS "#ifdef __DECC
961 $ WS "#include <stdlib.h>
962 $ WS "#endif
963 $ WS "#include <stdio.h>
964 $ WS "#include <unistd.h>
965 $ WS "#include <fcntl.h>
966 $ WS "int main()
967 $ WS "{"
968 $ WS "fcntl(1,2,3);
969 $ WS "exit(0);
970 $ WS "}"
971 $ CS
972 $   DEFINE SYS$ERROR _NLA0:
973 $   DEFINE SYS$OUTPUT _NLA0:
974 $   on error then continue
975 $   on warning then continue
976 $   'Checkcc' temp.c
977 $   savedstatus = $status
978 $   teststatus = f$extract(9,1,savedstatus)
979 $   if (teststatus.nes."1")
980 $   THEN
981 $     perl_d_fcntl="undef"
982 $     DEASSIGN SYS$OUTPUT
983 $     DEASSIGN SYS$ERROR
984 $   ELSE
985 $     If (Needs_Opt.eqs."Yes")
986 $     THEN
987 $       link temp.obj,temp.opt/opt
988 $     else
989 $       link temp.obj
990 $     endif
991 $     savedstatus = $status
992 $     teststatus = f$extract(9,1,savedstatus)
993 $     DEASSIGN SYS$OUTPUT
994 $     DEASSIGN SYS$ERROR
995 $     if (teststatus.nes."1")
996 $     THEN
997 $       perl_d_fcntl="undef"
998 $     ELSE
999 $       perl_d_fcntl="define"
1000 $     ENDIF
1001 $   ENDIF
1002 $ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
1003 $!
1004 $! Check for bzero
1005 $!
1006 $ OS
1007 $ WS "#ifdef __DECC
1008 $ WS "#include <stdlib.h>
1009 $ WS "#endif
1010 $ WS "#include <stdio.h>
1011 $ WS "#include <strings.h>
1012 $ WS "int main()
1013 $ WS "{"
1014 $ WS "char foo[10];
1015 $ WS "bzero(foo, 10);
1016 $ WS "exit(0);
1017 $ WS "}"
1018 $ CS
1019 $   DEFINE SYS$ERROR _NLA0:
1020 $   DEFINE SYS$OUTPUT _NLA0:
1021 $   on error then continue
1022 $   on warning then continue
1023 $   'Checkcc' temp.c
1024 $   savedstatus = $status
1025 $   teststatus = f$extract(9,1,savedstatus)
1026 $   if (teststatus.nes."1")
1027 $   THEN
1028 $     perl_d_bzero="undef"
1029 $     DEASSIGN SYS$OUTPUT
1030 $     DEASSIGN SYS$ERROR
1031 $   ELSE
1032 $     If (Needs_Opt.eqs."Yes")
1033 $     THEN
1034 $       link temp.obj,temp.opt/opt
1035 $     else
1036 $       link temp.obj
1037 $     endif
1038 $     savedstatus = $status
1039 $     teststatus = f$extract(9,1,savedstatus)
1040 $     DEASSIGN SYS$OUTPUT
1041 $     DEASSIGN SYS$ERROR
1042 $     if (teststatus.nes."1")
1043 $     THEN
1044 $       perl_d_bzero="undef"
1045 $     ELSE
1046 $       perl_d_bzero="define"
1047 $     ENDIF
1048 $   ENDIF
1049 $ WRITE_RESULT "d_bzero is ''perl_d_bzero'"
1050 $!
1051 $! Check for bcopy
1052 $!
1053 $ OS
1054 $ WS "#ifdef __DECC
1055 $ WS "#include <stdlib.h>
1056 $ WS "#endif
1057 $ WS "#include <stdio.h>
1058 $ WS "#include <strings.h>
1059 $ WS "int main()
1060 $ WS "{"
1061 $ WS "char foo[10], bar[10];
1062 $ WS "bcopy(""foo"", bar, 3);
1063 $ WS "exit(0);
1064 $ WS "}"
1065 $ CS
1066 $   DEFINE SYS$ERROR _NLA0:
1067 $   DEFINE SYS$OUTPUT _NLA0:
1068 $   on error then continue
1069 $   on warning then continue
1070 $   'Checkcc' temp.c
1071 $   savedstatus = $status
1072 $   teststatus = f$extract(9,1,savedstatus)
1073 $   if (teststatus.nes."1")
1074 $   THEN
1075 $     perl_d_bcopy="undef"
1076 $     DEASSIGN SYS$OUTPUT
1077 $     DEASSIGN SYS$ERROR
1078 $   ELSE
1079 $     If (Needs_Opt.eqs."Yes")
1080 $     THEN
1081 $       link temp.obj,temp.opt/opt
1082 $     else
1083 $       link temp.obj
1084 $     endif
1085 $     savedstatus = $status
1086 $     teststatus = f$extract(9,1,savedstatus)
1087 $     DEASSIGN SYS$OUTPUT
1088 $     DEASSIGN SYS$ERROR
1089 $     if (teststatus.nes."1")
1090 $     THEN
1091 $       perl_d_bcopy="undef"
1092 $     ELSE
1093 $       perl_d_bcopy="define"
1094 $     ENDIF
1095 $   ENDIF
1096 $ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'"
1097 $!
1098 $! Check for mkstemp
1099 $!
1100 $ OS
1101 $ WS "#ifdef __DECC
1102 $ WS "#include <stdlib.h>
1103 $ WS "#endif
1104 $ WS "#include <stdio.h>
1105 $ WS "int main()
1106 $ WS "{"
1107 $ WS "mkstemp(""foo"");
1108 $ WS "exit(0);
1109 $ WS "}"
1110 $ CS
1111 $   DEFINE SYS$ERROR _NLA0:
1112 $   DEFINE SYS$OUTPUT _NLA0:
1113 $   on error then continue
1114 $   on warning then continue
1115 $   'Checkcc' temp.c
1116 $   If (Needs_Opt.eqs."Yes")
1117 $   THEN
1118 $     link temp.obj,temp.opt/opt
1119 $   else
1120 $     link temp.obj
1121 $   endif
1122 $   savedstatus = $status
1123 $   teststatus = f$extract(9,1,savedstatus)
1124 $   DEASSIGN SYS$OUTPUT
1125 $   DEASSIGN SYS$ERROR
1126 $   if (teststatus.nes."1")
1127 $   THEN
1128 $     perl_d_mkstemp="undef"
1129 $   ELSE
1130 $     perl_d_mkstemp="define"
1131 $   ENDIF
1132 $ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'"
1133 $!
1134 $! Check for setvbuf
1135 $!
1136 $ OS
1137 $ WS "#ifdef __DECC
1138 $ WS "#include <stdlib.h>
1139 $ WS "#endif
1140 $ WS "#include <stdio.h>
1141 $ WS "int main()
1142 $ WS "{"
1143 $ WS "FILE *foo;
1144 $ WS "char Buffer[99];
1145 $ WS "foo = fopen(""foo"", ""r"");
1146 $ WS "setvbuf(foo, Buffer, 0, 0);
1147 $ WS "exit(0);
1148 $ WS "}"
1149 $ CS
1150 $   DEFINE SYS$ERROR _NLA0:
1151 $   DEFINE SYS$OUTPUT _NLA0:
1152 $   on error then continue
1153 $   on warning then continue
1154 $   'Checkcc' temp.c
1155 $   If (Needs_Opt.eqs."Yes")
1156 $   THEN
1157 $     link temp.obj,temp.opt/opt
1158 $   else
1159 $     link temp.obj
1160 $   endif
1161 $   teststatus = f$extract(9,1,$status)
1162 $   DEASSIGN SYS$OUTPUT
1163 $   DEASSIGN SYS$ERROR
1164 $   if (teststatus.nes."1")
1165 $   THEN
1166 $     perl_d_setvbuf="undef"
1167 $   ELSE
1168 $     perl_d_setvbuf="define"
1169 $   ENDIF
1170 $ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
1171 $!
1172 $! Check for <netinet/in.h>
1173 $!
1174 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1175 $ THEN
1176 $ OS
1177 $ WS "#ifdef __DECC
1178 $ WS "#include <stdlib.h>
1179 $ WS "#endif
1180 $ WS "#include <stdio.h>
1181 $ if ("''Has_Socketshr'".eqs."T")
1182 $ THEN
1183 $  WS "#include <socketshr.h>"
1184 $ else
1185 $  WS "#include <netdb.h>
1186 $ endif
1187 $ WS "#include <netinet/in.h>"
1188 $ WS "int main()
1189 $ WS "{"
1190 $ WS "exit(0);
1191 $ WS "}"
1192 $ CS
1193 $   DEFINE SYS$ERROR _NLA0:
1194 $   DEFINE SYS$OUTPUT _NLA0:
1195 $   on error then continue
1196 $   on warning then continue
1197 $   'Checkcc' temp.c
1198 $   If (Needs_Opt.eqs."Yes")
1199 $   THEN
1200 $     link temp.obj,temp.opt/opt
1201 $   else
1202 $     link temp.obj
1203 $   endif
1204 $   teststatus = f$extract(9,1,$status)
1205 $   DEASSIGN SYS$OUTPUT
1206 $   DEASSIGN SYS$ERROR
1207 $   if (teststatus.nes."1")
1208 $   THEN
1209 $     perl_i_niin="undef"
1210 $   ELSE
1211 $     perl_i_niin="define"
1212 $   ENDIF
1213 $ ELSE
1214 $   perl_i_niin="undef"
1215 $ ENDIF
1216 $ WRITE_RESULT "i_niin is ''perl_i_niin'"
1217 $!
1218 $! Check for endhostent
1219 $!
1220 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1221 $ THEN
1222 $ OS
1223 $ WS "#ifdef __DECC
1224 $ WS "#include <stdlib.h>
1225 $ WS "#endif
1226 $ WS "#include <stdio.h>
1227 $ if ("''Has_Socketshr'".eqs."T")
1228 $ THEN
1229 $  WS "#include <socketshr.h>"
1230 $ else
1231 $  WS "#include <netdb.h>
1232 $ endif
1233 $ WS "int main()
1234 $ WS "{"
1235 $ WS "endhostent();
1236 $ WS "exit(0);
1237
1238 $ CS
1239 $   DEFINE SYS$ERROR _NLA0:
1240 $   DEFINE SYS$OUTPUT _NLA0:
1241 $   on error then continue
1242 $   on warning then continue
1243 $   'Checkcc' temp.c
1244 $   If (Needs_Opt.eqs."Yes")
1245 $   THEN
1246 $     link temp.obj,temp.opt/opt
1247 $   else
1248 $     link temp.obj
1249 $   endif
1250 $   teststatus = f$extract(9,1,$status)
1251 $   DEASSIGN SYS$OUTPUT
1252 $   DEASSIGN SYS$ERROR
1253 $   if (teststatus.nes."1")
1254 $   THEN
1255 $     perl_d_endhent="undef"
1256 $   ELSE
1257 $     perl_d_endhent="define"
1258 $   ENDIF
1259 $ ELSE
1260 $ perl_d_endhent="undef"
1261 $ ENDIF
1262 $ WRITE_RESULT "d_endhent is ''perl_d_endhent'"
1263 $!
1264 $! Check for endnetent
1265 $!
1266 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1267 $ THEN
1268 $ OS
1269 $ WS "#ifdef __DECC
1270 $ WS "#include <stdlib.h>
1271 $ WS "#endif
1272 $ WS "#include <stdio.h>
1273 $ if ("''Has_Socketshr'".eqs."T")
1274 $ THEN
1275 $  WS "#include <socketshr.h>"
1276 $ else
1277 $  WS "#include <netdb.h>
1278 $ endif
1279 $ WS "int main()
1280 $ WS "{"
1281 $ WS "endnetent();
1282 $ WS "exit(0);
1283 $ WS "}"
1284 $ CS
1285 $   DEFINE SYS$ERROR _NLA0:
1286 $   DEFINE SYS$OUTPUT _NLA0:
1287 $   on error then continue
1288 $   on warning then continue
1289 $   'Checkcc' temp.c
1290 $   If (Needs_Opt.eqs."Yes")
1291 $   THEN
1292 $     link temp.obj,temp.opt/opt
1293 $   else
1294 $     link temp.obj
1295 $   endif
1296 $   teststatus = f$extract(9,1,$status)
1297 $   DEASSIGN SYS$OUTPUT
1298 $   DEASSIGN SYS$ERROR
1299 $   if (teststatus.nes."1")
1300 $   THEN
1301 $     perl_d_endnent="undef"
1302 $   ELSE
1303 $     perl_d_endnent="define"
1304 $   ENDIF
1305 $ ELSE
1306 $ perl_d_endnent="undef"
1307 $ ENDIF
1308 $ WRITE_RESULT "d_endnent is ''perl_d_endnent'"
1309 $!
1310 $! Check for endprotoent
1311 $!
1312 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1313 $ THEN
1314 $ OS
1315 $ WS "#ifdef __DECC
1316 $ WS "#include <stdlib.h>
1317 $ WS "#endif
1318 $ WS "#include <stdio.h>
1319 $ if ("''Has_Socketshr'".eqs."T")
1320 $ THEN
1321 $  WS "#include <socketshr.h>"
1322 $ else
1323 $  WS "#include <netdb.h>
1324 $ endif
1325 $ WS "int main()
1326 $ WS "{"
1327 $ WS "endprotoent();
1328 $ WS "exit(0);
1329 $ WS "}"
1330 $ CS
1331 $   DEFINE SYS$ERROR _NLA0:
1332 $   DEFINE SYS$OUTPUT _NLA0:
1333 $   on error then continue
1334 $   on warning then continue
1335 $   'Checkcc' temp.c
1336 $   If (Needs_Opt.eqs."Yes")
1337 $   THEN
1338 $     link temp.obj,temp.opt/opt
1339 $   else
1340 $     link temp.obj
1341 $   endif
1342 $   teststatus = f$extract(9,1,$status)
1343 $   DEASSIGN SYS$OUTPUT
1344 $   DEASSIGN SYS$ERROR
1345 $   if (teststatus.nes."1")
1346 $   THEN
1347 $     perl_d_endpent="undef"
1348 $   ELSE
1349 $     perl_d_endpent="define"
1350 $   ENDIF
1351 $ ELSE
1352 $ perl_d_endpent="undef"
1353 $ ENDIF
1354 $ WRITE_RESULT "d_endpent is ''perl_d_endpent'"
1355 $!
1356 $! Check for endservent
1357 $!
1358 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1359 $ THEN
1360 $ OS
1361 $ WS "#ifdef __DECC
1362 $ WS "#include <stdlib.h>
1363 $ WS "#endif
1364 $ WS "#include <stdio.h>
1365 $ if ("''Has_Socketshr'".eqs."T")
1366 $ THEN
1367 $  WS "#include <socketshr.h>"
1368 $ else
1369 $  WS "#include <netdb.h>
1370 $ endif
1371 $ WS "int main()
1372 $ WS "{"
1373 $ WS "endservent();
1374 $ WS "exit(0);
1375 $ WS "}"
1376 $ CS
1377 $   DEFINE SYS$ERROR _NLA0:
1378 $   DEFINE SYS$OUTPUT _NLA0:
1379 $   on error then continue
1380 $   on warning then continue
1381 $   'Checkcc' temp.c
1382 $   If (Needs_Opt.eqs."Yes")
1383 $   THEN
1384 $     link temp.obj,temp.opt/opt
1385 $   else
1386 $     link temp.obj
1387 $   endif
1388 $   teststatus = f$extract(9,1,$status)
1389 $   DEASSIGN SYS$OUTPUT
1390 $   DEASSIGN SYS$ERROR
1391 $   if (teststatus.nes."1")
1392 $   THEN
1393 $     perl_d_endsent="undef"
1394 $   ELSE
1395 $     perl_d_endsent="define"
1396 $   ENDIF
1397 $ ELSE
1398 $ perl_d_endsent="undef"
1399 $ ENDIF
1400 $ WRITE_RESULT "d_endsent is ''perl_d_endsent'"
1401 $!
1402 $! Check for sethostent
1403 $!
1404 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1405 $ THEN
1406 $ OS
1407 $ WS "#ifdef __DECC
1408 $ WS "#include <stdlib.h>
1409 $ WS "#endif
1410 $ WS "#include <stdio.h>
1411 $ if ("''Has_Socketshr'".eqs."T")
1412 $ THEN
1413 $  WS "#include <socketshr.h>"
1414 $ else
1415 $  WS "#include <netdb.h>
1416 $ endif
1417 $ WS "int main()
1418 $ WS "{"
1419 $ WS "sethostent(1);
1420 $ WS "exit(0);
1421 $ WS "}"
1422 $ CS
1423 $   DEFINE SYS$ERROR _NLA0:
1424 $   DEFINE SYS$OUTPUT _NLA0:
1425 $   on error then continue
1426 $   on warning then continue
1427 $   'Checkcc' temp.c
1428 $   If (Needs_Opt.eqs."Yes")
1429 $   THEN
1430 $     link temp.obj,temp.opt/opt
1431 $   else
1432 $     link temp.obj
1433 $   endif
1434 $   teststatus = f$extract(9,1,$status)
1435 $   DEASSIGN SYS$OUTPUT
1436 $   DEASSIGN SYS$ERROR
1437 $   if (teststatus.nes."1")
1438 $   THEN
1439 $     perl_d_sethent="undef"
1440 $   ELSE
1441 $     perl_d_sethent="define"
1442 $   ENDIF
1443 $ ELSE
1444 $ perl_d_sethent="undef"
1445 $ ENDIF
1446 $ WRITE_RESULT "d_sethent is ''perl_d_sethent'"
1447 $!
1448 $! Check for setnetent
1449 $!
1450 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1451 $ THEN
1452 $ OS
1453 $ WS "#ifdef __DECC
1454 $ WS "#include <stdlib.h>
1455 $ WS "#endif
1456 $ WS "#include <stdio.h>
1457 $ if ("''Has_Socketshr'".eqs."T")
1458 $ THEN
1459 $  WS "#include <socketshr.h>"
1460 $ else
1461 $  WS "#include <netdb.h>
1462 $ endif
1463 $ WS "int main()
1464 $ WS "{"
1465 $ WS "setnetent(1);
1466 $ WS "exit(0);
1467 $ WS "}"
1468 $ CS
1469 $   DEFINE SYS$ERROR _NLA0:
1470 $   DEFINE SYS$OUTPUT _NLA0:
1471 $   on error then continue
1472 $   on warning then continue
1473 $   'Checkcc' temp.c
1474 $   If (Needs_Opt.eqs."Yes")
1475 $   THEN
1476 $     link temp.obj,temp.opt/opt
1477 $   else
1478 $     link temp.obj
1479 $   endif
1480 $   teststatus = f$extract(9,1,$status)
1481 $   DEASSIGN SYS$OUTPUT
1482 $   DEASSIGN SYS$ERROR
1483 $   if (teststatus.nes."1")
1484 $   THEN
1485 $     perl_d_setnent="undef"
1486 $   ELSE
1487 $     perl_d_setnent="define"
1488 $   ENDIF
1489 $ ELSE
1490 $ perl_d_setnent="undef"
1491 $ ENDIF
1492 $ WRITE_RESULT "d_setnent is ''perl_d_setnent'"
1493 $!
1494 $! Check for setprotoent
1495 $!
1496 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1497 $ THEN
1498 $ OS
1499 $ WS "#ifdef __DECC
1500 $ WS "#include <stdlib.h>
1501 $ WS "#endif
1502 $ WS "#include <stdio.h>
1503 $ if ("''Has_Socketshr'".eqs."T")
1504 $ THEN
1505 $  WS "#include <socketshr.h>"
1506 $ else
1507 $  WS "#include <netdb.h>
1508 $ endif
1509 $ WS "int main()
1510 $ WS "{"
1511 $ WS "setprotoent(1);
1512 $ WS "exit(0);
1513 $ WS "}"
1514 $ CS
1515 $   DEFINE SYS$ERROR _NLA0:
1516 $   DEFINE SYS$OUTPUT _NLA0:
1517 $   on error then continue
1518 $   on warning then continue
1519 $   'Checkcc' temp.c
1520 $   If (Needs_Opt.eqs."Yes")
1521 $   THEN
1522 $     link temp.obj,temp.opt/opt
1523 $   else
1524 $     link temp.obj
1525 $   endif
1526 $   teststatus = f$extract(9,1,$status)
1527 $   DEASSIGN SYS$OUTPUT
1528 $   DEASSIGN SYS$ERROR
1529 $   if (teststatus.nes."1")
1530 $   THEN
1531 $     perl_d_setpent="undef"
1532 $   ELSE
1533 $     perl_d_setpent="define"
1534 $   ENDIF
1535 $ ELSE
1536 $ perl_d_setpent="undef"
1537 $ ENDIF
1538 $ WRITE_RESULT "d_setpent is ''perl_d_setpent'"
1539 $!
1540 $! Check for setservent
1541 $!
1542 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1543 $ THEN
1544 $ OS
1545 $ WS "#ifdef __DECC
1546 $ WS "#include <stdlib.h>
1547 $ WS "#endif
1548 $ WS "#include <stdio.h>
1549 $ if ("''Has_Socketshr'".eqs."T")
1550 $ THEN
1551 $  WS "#include <socketshr.h>"
1552 $ else
1553 $  WS "#include <netdb.h>
1554 $ endif
1555 $ WS "int main()
1556 $ WS "{"
1557 $ WS "setservent(1);
1558 $ WS "exit(0);
1559 $ WS "}"
1560 $ CS
1561 $   DEFINE SYS$ERROR _NLA0:
1562 $   DEFINE SYS$OUTPUT _NLA0:
1563 $   on error then continue
1564 $   on warning then continue
1565 $   'Checkcc' temp.c
1566 $   If (Needs_Opt.eqs."Yes")
1567 $   THEN
1568 $     link temp.obj,temp.opt/opt
1569 $   else
1570 $     link temp.obj
1571 $   endif
1572 $   teststatus = f$extract(9,1,$status)
1573 $   DEASSIGN SYS$OUTPUT
1574 $   DEASSIGN SYS$ERROR
1575 $   if (teststatus.nes."1")
1576 $   THEN
1577 $     perl_d_setsent="undef"
1578 $   ELSE
1579 $     perl_d_setsent="define"
1580 $   ENDIF
1581 $ ELSE
1582 $ perl_d_setsent="undef"
1583 $ ENDIF
1584 $ WRITE_RESULT "d_setsent is ''perl_d_setsent'"
1585 $!
1586 $! Check for gethostent
1587 $!
1588 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1589 $ THEN
1590 $ OS
1591 $ WS "#ifdef __DECC
1592 $ WS "#include <stdlib.h>
1593 $ WS "#endif
1594 $ WS "#include <stdio.h>
1595 $ if ("''Has_Socketshr'".eqs."T")
1596 $ THEN
1597 $  WS "#include <socketshr.h>"
1598 $ else
1599 $  WS "#include <netdb.h>
1600 $ endif
1601 $ WS "int main()
1602 $ WS "{"
1603 $ WS "gethostent();
1604 $ WS "exit(0);
1605 $ WS "}"
1606 $ CS
1607 $   DEFINE SYS$ERROR _NLA0:
1608 $   DEFINE SYS$OUTPUT _NLA0:
1609 $   on error then continue
1610 $   on warning then continue
1611 $   'Checkcc' temp.c
1612 $   If (Needs_Opt.eqs."Yes")
1613 $   THEN
1614 $     link temp.obj,temp.opt/opt
1615 $   else
1616 $     link temp.obj
1617 $   endif
1618 $   teststatus = f$extract(9,1,$status)
1619 $   DEASSIGN SYS$OUTPUT
1620 $   DEASSIGN SYS$ERROR
1621 $   if (teststatus.nes."1")
1622 $   THEN
1623 $     perl_d_gethent="undef"
1624 $   ELSE
1625 $     perl_d_gethent="define"
1626 $   ENDIF
1627 $ ELSE
1628 $ perl_d_gethent="undef"
1629 $ ENDIF
1630 $ WRITE_RESULT "d_gethent is ''perl_d_gethent'"
1631 $!
1632 $! Check for getnetent
1633 $!
1634 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1635 $ THEN
1636 $ OS
1637 $ WS "#ifdef __DECC
1638 $ WS "#include <stdlib.h>
1639 $ WS "#endif
1640 $ WS "#include <stdio.h>
1641 $ if ("''Has_Socketshr'".eqs."T")
1642 $ THEN
1643 $  WS "#include <socketshr.h>"
1644 $ else
1645 $  WS "#include <netdb.h>
1646 $ endif
1647 $ WS "int main()
1648 $ WS "{"
1649 $ WS "getnetent();
1650 $ WS "exit(0);
1651 $ WS "}"
1652 $ CS
1653 $   DEFINE SYS$ERROR _NLA0:
1654 $   DEFINE SYS$OUTPUT _NLA0:
1655 $   on error then continue
1656 $   on warning then continue
1657 $   'Checkcc' temp.c
1658 $   If (Needs_Opt.eqs."Yes")
1659 $   THEN
1660 $     link temp.obj,temp.opt/opt
1661 $   else
1662 $     link temp.obj
1663 $   endif
1664 $   teststatus = f$extract(9,1,$status)
1665 $   DEASSIGN SYS$OUTPUT
1666 $   DEASSIGN SYS$ERROR
1667 $   if (teststatus.nes."1")
1668 $   THEN
1669 $     perl_d_getnent="undef"
1670 $   ELSE
1671 $     perl_d_getnent="define"
1672 $   ENDIF
1673 $ ELSE
1674 $ perl_d_getnent="undef"
1675 $ ENDIF
1676 $ WRITE_RESULT "d_getnent is ''perl_d_getnent'"
1677 $!
1678 $! Check for getprotoent
1679 $!
1680 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1681 $ THEN
1682 $ OS
1683 $ WS "#ifdef __DECC
1684 $ WS "#include <stdlib.h>
1685 $ WS "#endif
1686 $ WS "#include <stdio.h>
1687 $ if ("''Has_Socketshr'".eqs."T")
1688 $ THEN
1689 $  WS "#include <socketshr.h>"
1690 $ else
1691 $  WS "#include <netdb.h>
1692 $ endif
1693 $ WS "int main()
1694 $ WS "{"
1695 $ WS "getprotoent();
1696 $ WS "exit(0);
1697 $ WS "}"
1698 $ CS
1699 $   DEFINE SYS$ERROR _NLA0:
1700 $   DEFINE SYS$OUTPUT _NLA0:
1701 $   on error then continue
1702 $   on warning then continue
1703 $   'Checkcc' temp.c
1704 $   If (Needs_Opt.eqs."Yes")
1705 $   THEN
1706 $     link temp.obj,temp.opt/opt
1707 $   else
1708 $     link temp.obj
1709 $   endif
1710 $   teststatus = f$extract(9,1,$status)
1711 $   DEASSIGN SYS$OUTPUT
1712 $   DEASSIGN SYS$ERROR
1713 $   if (teststatus.nes."1")
1714 $   THEN
1715 $     perl_d_getpent="undef"
1716 $   ELSE
1717 $     perl_d_getpent="define"
1718 $   ENDIF
1719 $ ELSE
1720 $ perl_d_getpent="undef"
1721 $ ENDIF
1722 $ WRITE_RESULT "d_getpent is ''perl_d_getpent'"
1723 $!
1724 $! Check for getservent
1725 $!
1726 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1727 $ THEN
1728 $ OS
1729 $ WS "#ifdef __DECC
1730 $ WS "#include <stdlib.h>
1731 $ WS "#endif
1732 $ WS "#include <stdio.h>
1733 $ if ("''Has_Socketshr'".eqs."T")
1734 $ THEN
1735 $  WS "#include <socketshr.h>"
1736 $ else
1737 $  WS "#include <netdb.h>
1738 $ endif
1739 $ WS "int main()
1740 $ WS "{"
1741 $ WS "getservent();
1742 $ WS "exit(0);
1743 $ WS "}"
1744 $ CS
1745 $   DEFINE SYS$ERROR _NLA0:
1746 $   DEFINE SYS$OUTPUT _NLA0:
1747 $   on error then continue
1748 $   on warning then continue
1749 $   'Checkcc' temp.c
1750 $   If (Needs_Opt.eqs."Yes")
1751 $   THEN
1752 $     link temp.obj,temp.opt/opt
1753 $   else
1754 $     link temp.obj
1755 $   endif
1756 $   teststatus = f$extract(9,1,$status)
1757 $   DEASSIGN SYS$OUTPUT
1758 $   DEASSIGN SYS$ERROR
1759 $   if (teststatus.nes."1")
1760 $   THEN
1761 $     perl_d_getsent="undef"
1762 $   ELSE
1763 $     perl_d_getsent="define"
1764 $   ENDIF
1765 $ ELSE
1766 $ perl_d_getsent="undef"
1767 $ ENDIF
1768 $ WRITE_RESULT "d_getsent is ''perl_d_getsent'"
1769 $!
1770 $! Check for pthread_yield
1771 $!
1772 $ if ("''use_threads'".eqs."T")
1773 $ THEN
1774 $ OS
1775 $ WS "#ifdef __DECC
1776 $ WS "#include <stdlib.h>
1777 $ WS "#endif
1778 $ WS "#include <pthread.h>
1779 $ WS "#include <stdio.h>
1780 $ WS "int main()
1781 $ WS "{"
1782 $ WS "pthread_yield();
1783 $ WS "exit(0);
1784 $ WS "}"
1785 $ CS
1786 $   DEFINE SYS$ERROR _NLA0:
1787 $   DEFINE SYS$OUTPUT _NLA0:
1788 $   on error then continue
1789 $   on warning then continue
1790 $   'Checkcc' temp.c
1791 $   teststatus = f$extract(9,1,$status)
1792 $   DEASSIGN SYS$OUTPUT
1793 $   DEASSIGN SYS$ERROR
1794 $   if (teststatus.nes."1")
1795 $   THEN
1796 $     perl_d_pthread_yield="undef"
1797 $   ELSE
1798 $     perl_d_pthread_yield="define"
1799 $   ENDIF
1800 $ ELSE
1801 $   perl_d_pthread_yield="undef"
1802 $ ENDIF
1803 $ WRITE_RESULT "d_pthread_yield is ''perl_d_pthread_yield'"
1804 $!
1805 $! Check for sched_yield
1806 $!
1807 $ if ("''use_threads'".eqs."T")
1808 $ THEN
1809 $ OS
1810 $ WS "#ifdef __DECC
1811 $ WS "#include <stdlib.h>
1812 $ WS "#endif
1813 $ WS "#include <pthread.h>
1814 $ WS "#include <stdio.h>
1815 $ WS "int main()
1816 $ WS "{"
1817 $ WS "sched_yield();
1818 $ WS "exit(0);
1819 $ WS "}"
1820 $ CS
1821 $   DEFINE SYS$ERROR _NLA0:
1822 $   DEFINE SYS$OUTPUT _NLA0:
1823 $   on error then continue
1824 $   on warning then continue
1825 $   'Checkcc' temp.c
1826 $   teststatus = f$extract(9,1,$status)
1827 $   DEASSIGN SYS$OUTPUT
1828 $   DEASSIGN SYS$ERROR
1829 $   if (teststatus.nes."1")
1830 $   THEN
1831 $     perl_d_sched_yield="undef"
1832 $   ELSE
1833 $     perl_d_sched_yield="define"
1834 $   ENDIF
1835 $ ELSE
1836 $   perl_d_sched_yield="undef"
1837 $ ENDIF
1838 $ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
1839 $!
1840 $! Check for generic pointer size
1841 $!
1842 $ OS
1843 $ WS "#ifdef __DECC
1844 $ WS "#include <stdlib.h>
1845 $ WS "#endif
1846 $ WS "#include <stdio.h>
1847 $ WS "int main()
1848 $ WS "{"
1849 $ WS "int foo;
1850 $ WS "foo = sizeof(char *);
1851 $ WS "printf(""%d\n"", foo);
1852 $ WS "exit(0);
1853 $ WS "}"
1854 $ CS
1855 $! copy temp.c sys$output
1856 $!
1857 $   DEFINE SYS$ERROR _NLA0:
1858 $   DEFINE SYS$OUTPUT _NLA0:
1859 $   ON ERROR THEN CONTINUE
1860 $   ON WARNING THEN CONTINUE
1861 $   'Checkcc' temp.c
1862 $   If (Needs_Opt.eqs."Yes")
1863 $   THEN
1864 $     link temp.obj,temp.opt/opt
1865 $   else
1866 $     link temp.obj
1867 $   endif
1868 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
1869 $   DEASSIGN SYS$OUTPUT
1870 $   DEASSIGN SYS$ERROR
1871 $   DEFINE SYS$ERROR TEMPOUT
1872 $   DEFINE SYS$OUTPUT TEMPOUT
1873 $   mcr []temp
1874 $   CLOSE TEMPOUT
1875 $   DEASSIGN SYS$OUTPUT
1876 $   DEASSIGN SYS$ERROR
1877 $   OPEN/READ TEMPOUT [-.uu]tempout.lis
1878 $   READ TEMPOUT line
1879 $   CLOSE TEMPOUT
1880
1881 $ perl_ptrsize=line
1882 $ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
1883 $!
1884 $ set nover
1885 $! Done with compiler checks. Clean up.
1886 $ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
1887 $ if f$search("temp.obj").nes."" then DELETE/NOLOG temp.obj;*
1888 $ if f$search("temp.exe").nes."" then DELETE/NOLOG temp.exe;*
1889 $ if f$search("temp.opt").nes."" then DELETE/NOLOG Temp.opt;*
1890 $!
1891 $!
1892 $! Some that are compiler or VMS version sensitive
1893 $!
1894 $! Gnu C stuff
1895 $ IF "''Using_Gnu_C'".EQS."Yes"
1896 $ THEN
1897 $   perl_d_attribut="define"
1898 $   perl_vms_cc_type="gcc"
1899 $ ELSE
1900 $   perl_d_attribut="undef"
1901 $ ENDIF
1902 $
1903 $! Dec C >= 5.2 and VMS ver >= 7.0
1904 $ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
1905 $ THEN
1906 $ perl_d_bcmp="define"
1907 $ perl_d_gettimeod="define"
1908 $ perl_d_uname="define"
1909 $ perl_d_sigaction="define"
1910 $ perl_d_truncate="define"
1911 $ perl_d_wait4="define"
1912 $ perl_d_index="define"
1913 $ perl_pidtype="pid_t"
1914 $ 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"
1915 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
1916 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
1917 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
1918 $perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
1919 $ 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"
1920 $ perl_sig_num_with_commas=perl_sig_num
1921 $ perl_uidtype="uid_t"
1922 $ perl_d_pathconf="define"
1923 $ perl_d_fpathconf="define"
1924 $ perl_d_sysconf="define"
1925 $ perl_d_sigsetjmp="define"
1926 $ ELSE
1927 $ perl_pidtype="unsigned int"
1928 $ perl_d_gettimeod="undef"
1929 $ perl_d_bcmp="undef"
1930 $ perl_d_uname="undef"
1931 $ perl_d_sigaction="undef"
1932 $ perl_d_truncate="undef"
1933 $ perl_d_wait4="undef"
1934 $ perl_d_index="undef"
1935 $ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
1936 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
1937 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
1938 $ perl_sig_name_with_commas = psnwc1 + psnwc2
1939 $ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
1940 $ perl_sig_num_with_commas=perl_sig_num
1941 $ perl_uidtype="unsigned int"
1942 $ perl_d_pathconf="undef"
1943 $ perl_d_fpathconf="undef"
1944 $ perl_d_sysconf="undef"
1945 $ perl_d_sigsetjmp="undef"
1946 $ ENDIF
1947 $!
1948 $! Dec C alone
1949 $ IF ("''Using_Dec_C'".EQS."Yes")
1950 $ THEN
1951 $ perl_d_mbstowcs="define"
1952 $ perl_d_mbtowc="define"
1953 $ perl_d_stdiobase="define"
1954 $ perl_d_stdio_ptr_lval="define"
1955 $ perl_d_stdio_cnt_lval="define"
1956 $ perl_d_stdstdio="define"
1957 $ perl_d_wcstombs="define"
1958 $ perl_d_mblen="define"
1959 $ perl_d_mktime="define"
1960 $ perl_d_strcoll="define"
1961 $ perl_d_strxfrm="define"
1962 $ perl_d_wctomb="define"
1963 $ perl_i_locale="define"
1964 $ perl_d_locconv="define"
1965 $ perl_d_setlocale="define"
1966 $ perl_vms_cc_type="decc"
1967 $ ELSE
1968 $ perl_d_mbstowcs="undef"
1969 $ perl_d_mbtowc="undef"
1970 $ perl_d_stdiobase="undef"
1971 $ perl_d_stdio_ptr_lval="undef"
1972 $ perl_d_stdio_cnt_lval="undef"
1973 $ perl_d_stdstdio="undef"
1974 $ perl_d_wcstombs="undef"
1975 $ perl_d_mblen="undef"
1976 $ perl_d_mktime="undef"
1977 $ perl_d_strcoll="undef"
1978 $ perl_d_strxfrm="undef"
1979 $ perl_d_wctomb="undef"
1980 $ perl_i_locale="undef"
1981 $ perl_d_locconv="undef"
1982 $ perl_d_setlocale="undef"
1983 $ ENDIF
1984 $!
1985 $! Vax C stuff
1986 $ if ("''Using_Vax_C'".EQS."Yes")
1987 $ THEN
1988 $ perl_vms_cc_type="vaxc"
1989 $ ENDIF
1990 $!
1991 $!
1992 $! Sockets?
1993 $ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
1994 $ THEN
1995 $ perl_d_vms_do_sockets="define"
1996 $ perl_d_htonl="define"
1997 $ perl_d_socket="define"
1998 $ perl_d_select="define"
1999 $ perl_netdb_host_type="char *"
2000 $ perl_netdb_hlen_type="int"
2001 $ perl_netdb_name_type="char *"
2002 $ perl_netdb_net_type="long"
2003 $ perl_d_gethbyaddr="define"
2004 $ perl_d_gethbyname="define"
2005 $ perl_d_getnbyaddr="define"
2006 $ perl_d_getnbyname="define"
2007 $ perl_d_getpbynumber="define"
2008 $ perl_d_getpbyname="define"
2009 $ perl_d_getsbyport="define"
2010 $ perl_d_getsbyname="define"
2011 $ perl_d_gethostprotos="define"
2012 $ perl_d_getnetprotos="define"
2013 $ perl_d_getprotoprotos="define"
2014 $ perl_d_getservprotos="define"
2015 $ ELSE
2016 $ perl_d_vms_do_sockets="undef"
2017 $ perl_d_htonl="undef"
2018 $ perl_d_socket="undef"
2019 $ perl_d_select="undef"
2020 $ perl_netdb_host_type="char *"
2021 $ perl_netdb_hlen_type="int"
2022 $ perl_netdb_name_type="char *"
2023 $ perl_netdb_net_type="long"
2024 $ perl_d_gethbyaddr="undef"
2025 $ perl_d_gethbyname="undef"
2026 $ perl_d_getnbyaddr="undef"
2027 $ perl_d_getnbyname="undef"
2028 $ perl_d_getpbynumber="undef"
2029 $ perl_d_getpbyname="undef"
2030 $ perl_d_getsbyport="undef"
2031 $ perl_d_getsbyname="undef"
2032 $ perl_d_gethostprotos="undef"
2033 $ perl_d_getnetprotos="undef"
2034 $ perl_d_getprotoprotos="undef"
2035 $ perl_d_getservprotos="undef"
2036 $ ENDIF
2037 $! Threads
2038 $ if ("''use_threads'".eqs."T")
2039 $ THEN
2040 $   perl_usethreads="define"
2041 $   perl_d_pthreads_created_joinable="define"
2042 $   if ("''VMS_VER'".ges."7.0")
2043 $   THEN
2044 $     perl_d_oldpthreads="undef"
2045 $   ELSE
2046 $     perl_d_oldpthreads="define"
2047 $   ENDIF
2048 $ ELSE
2049 $   perl_d_oldpthreads="undef"
2050 $   perl_usethreads="undef"
2051 $   
2052 $   perl_d_pthreads_created_joinable="undef"
2053 $ ENDIF
2054 $! 
2055 $! 
2056 $! Finally the composite ones. All config
2057 $ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
2058 $ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
2059 $ perl_myhostname="''myhostname'"
2060 $ perl_mydomain="''mydomain'"
2061 $ perl_perladmin="''perladmin'"
2062 $ perl_cf_email="''cf_email'"
2063 $ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
2064 $ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
2065 $ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
2066 $ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
2067 $ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
2068 $ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
2069 $ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
2070 $ if "''Using_Dec_C'" .eqs. "Yes"
2071 $ THEN
2072 $ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
2073 $ ELSE
2074 $   IF "''Using_Vax_C'" .eqs. "Yes"
2075 $   THEN
2076 $     perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
2077 $   ENDIF
2078 $ ENDIF
2079 $!
2080 $! Finally clean off any leading zeros from the patchlevel or subversion
2081 $ perl_patchlevel = perl_patchlevel + 0
2082 $ perl_subversion = perl_subversion + 0
2083 $!
2084 $! Okay, we've got everything configured. Now go write out a config.sh.
2085 $ open/write CONFIGSH [-]config.sh
2086 $ WC := "write CONFIGSH"
2087 $!
2088 $ WC "# This file generated by Configure.COM on a VMS system."
2089 $ WC "# Time: " + perl_cf_time
2090 $ WC ""
2091 $ WC "package='" + perl_package + "'"
2092 $ WC "CONFIG='" + perl_config + "'"
2093 $ WC "cf_time='" + perl_cf_time + "'"
2094 $ WC "cf_by='" + perl_cf_by+ "'"
2095 $ WC "cpp_stuff='" + perl_cpp_stuff + "'"
2096 $ WC "ccdlflags='" + perl_ccdlflags + "'"
2097 $ WC "cccdlflags='" + perl_cccdlflags + "'"
2098 $ WC "mab='" + perl_mab + "'"
2099 $ WC "libpth='" + perl_libpth + "'"
2100 $ WC "ld='" + perl_ld + "'"
2101 $ WC "lddlflags='" + perl_lddlflags + "'"
2102 $ WC "ranlib='" + perl_ranlib + "'"
2103 $ WC "ar='" + perl_ar + "'"
2104 $ WC "eunicefix='" + perl_eunicefix + "'"
2105 $ WC "hint='" + perl_hint +"'"
2106 $ WC "hintfile='" + perl_hintfile + "'"
2107 $ WC "shrplib='" + perl_shrplib + "'"
2108 $ WC "usemymalloc='" + perl_usemymalloc + "'"
2109 $ WC "usevfork='" + perl_usevfork + "'"
2110 $ WC "useposix='false'"
2111 $ WC "spitshell='write sys$output '"
2112 $ WC "dlsrc='dl_vms.c'"
2113 $ WC "binexp='" + perl_binexp + "'"
2114 $ WC "man1ext='" + perl_man1ext + "'"
2115 $ WC "man3ext='" + perl_man3ext + "'"
2116 $ WC "arch='" + perl_arch + "'"
2117 $ WC "archname='" + perl_archname + "'"
2118 $ WC "osvers='" + perl_osvers + "'"
2119 $ WC "prefix='" + perl_prefix + "'"
2120 $ WC "builddir='" + perl_builddir + "'"
2121 $ WC "installbin='" + perl_installbin + "'"
2122 $ WC "installscript='" + perl_installscript + "'"
2123 $ WC "installman1dir='" + perl_installman1dir + "'"
2124 $ WC "installman3dir='" + perl_installman3dir + "'"
2125 $ WC "installprivlib='" + perl_installprivlib + "'"
2126 $ WC "installarchlib='" + perl_installarchlib + "'"
2127 $ WC "installsitelib='" + perl_installsitelib + "'"
2128 $ WC "installsitearch='" + perl_installsitearch + "'"
2129 $ WC "path_sep='" + perl_path_sep + "'"
2130 $ WC "vms_cc_type='" + perl_vms_cc_type + "'"
2131 $ WC "d_attribut='" + perl_d_attribut + "'"
2132 $ WC "cc='" + perl_cc + "'"
2133 $ WC "ccflags='" + perl_ccflags + "'"
2134 $ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
2135 $ WC "d_socket='" + perl_d_socket + "'"
2136 $ WC "d_sockpair='" + perl_d_sockpair + "'"
2137 $ WC "d_gethent='" + perl_d_gethent + "'"
2138 $ WC "d_getsent='" + perl_d_getsent + "'"
2139 $ WC "d_select='" + perl_d_select + "'"
2140 $ WC "i_niin='" + perl_i_niin + "'"
2141 $ WC "i_neterrno='" + perl_i_neterrno + "'"
2142 $ WC "d_stdstdio='" + perl_d_stdstdio + "'"
2143 $ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
2144 $ WC "d_stdio_cnt_lval='" + perl_d_stdio_cnt_lval + "'"
2145 $ WC "d_stdiobase='" + perl_d_stdiobase + "'"
2146 $ WC "d_locconv='" + perl_d_locconv + "'"
2147 $ WC "d_setlocale='" + perl_d_setlocale + "'"
2148 $ WC "i_locale='" + perl_i_locale + "'"
2149 $ WC "d_mbstowcs='" + perl_d_mbstowcs + "'"
2150 $ WC "d_mbtowc='" + perl_d_mbtowc + "'"
2151 $ WC "d_wcstombs='" + perl_d_wcstombs + "'"
2152 $ WC "d_wctomb='" + perl_d_wctomb + "'"
2153 $ WC "d_mblen='" + perl_d_mblen + "'"
2154 $ WC "d_mktime='" + perl_d_mktime + "'"
2155 $ WC "d_strcoll='" + perl_d_strcoll + "'"
2156 $ WC "d_strxfrm='" + perl_d_strxfrm  + "'"
2157 $ WC "ldflags='" + perl_ldflags + "'"
2158 $ WC "dlobj='" + perl_dlobj + "'"
2159 $ WC "obj_ext='" + perl_obj_ext + "'"
2160 $ WC "so='" + perl_so + "'"
2161 $ WC "dlext='" + perl_dlext + "'"
2162 $ WC "exe_ext='" + perl_exe_ext + "'"
2163 $ WC "lib_ext='" + perl_lib_ext + "'"
2164 $ WC "myhostname='" + perl_myhostname + "'"
2165 $ WC "mydomain='" + perl_mydomain + "'"
2166 $ WC "perladmin='" + perl_perladmin + "'"
2167 $ WC "cf_email='" + perl_cf_email + "'"
2168 $ WC "myuname='" + perl_myuname + "'"
2169 $ WC "alignbytes='" + perl_alignbytes + "'"
2170 $ WC "osname='" + perl_osname + "'"
2171 $ WC "d_archlib='" + perl_d_archlib + "'"
2172 $ WC "archlibexp='" + perl_archlibexp + "'"
2173 $ WC "archlib='" + perl_archlib + "'"
2174 $ WC "archname='" + perl_archname + "'"
2175 $ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
2176 $ WC "cppstdin='" + perl_cppstdin + "'"
2177 $ WC "cppminus='" + perl_cppminus + "'"
2178 $ WC "d_bcmp='" + perl_d_bcmp + "'"
2179 $ WC "d_bcopy='" + perl_d_bcopy + "'"
2180 $ WC "d_bzero='" + perl_d_bzero + "'"
2181 $ WC "d_castneg='" + perl_d_castneg + "'"
2182 $ WC "castflags='" + perl_castflags + "'"
2183 $ WC "d_chsize='" + perl_d_chsize + "'"
2184 $ WC "d_const='" + perl_d_const + "'"
2185 $ WC "d_crypt='" + perl_d_crypt + "'"
2186 $ WC "byteorder='" + perl_byteorder + "'"
2187 $ WC "full_csh='" + perl_full_csh + "'"
2188 $ WC "d_csh='" + perl_d_csh + "'"
2189 $ WC "d_dup2='" + perl_d_dup2 + "'"
2190 $ WC "d_fchmod='" + perl_d_fchmod + "'"
2191 $ WC "d_fchown='" + perl_d_fchown + "'"
2192 $ WC "d_fcntl='" + perl_d_fcntl + "'"
2193 $ WC "d_fgetpos='" + perl_d_fgetpos + "'"
2194 $ WC "d_flexfnam='" + perl_d_flexfnam + "'"
2195 $ WC "d_flock='" + perl_d_flock + "'"
2196 $ WC "d_fsetpos='" + perl_d_fsetpos + "'"
2197 $ WC "d_gettimeod='" + perl_d_gettimeod + "'"
2198 $ WC "d_getgrps='" + perl_d_getgrps + "'"
2199 $ WC "d_setgrps='" + perl_d_setgrps + "'"
2200 $ WC "d_uname='" + perl_d_uname + "'"
2201 $ WC "d_getprior='" + perl_d_getprior + "'"
2202 $ WC "d_killpg='" + perl_d_killpg + "'"
2203 $ WC "d_link='" + perl_d_link + "'"
2204 $ WC "d_lstat='" + perl_d_lstat + "'"
2205 $ WC "d_lockf='" + perl_d_lockf + "'"
2206 $ WC "d_memcmp='" + perl_d_memcmp + "'"
2207 $ WC "d_memcpy='" + perl_d_memcpy + "'"
2208 $ WC "d_memmove='" + perl_d_memmove + "'"
2209 $ WC "d_memset='" + perl_d_memset + "'"
2210 $ WC "d_mkdir='" + perl_d_mkdir + "'"
2211 $ WC "d_msg='" + perl_d_msg + "'"
2212 $ WC "d_open3='" + perl_d_open3 + "'"
2213 $ WC "d_poll='" + perl_d_poll + "'"
2214 $ WC "d_readdir='" + perl_d_readdir + "'"
2215 $ WC "d_seekdir='" + perl_d_seekdir + "'"
2216 $ WC "d_telldir='" + perl_d_telldir + "'"
2217 $ WC "d_rewinddir='" + perl_d_rewinddir + "'"
2218 $ WC "d_rename='" + perl_d_rename + "'"
2219 $ WC "d_rmdir='" + perl_d_rmdir + "'"
2220 $ WC "d_sem='" + perl_d_sem + "'"
2221 $ WC "d_setegid='" + perl_d_setegid + "'"
2222 $ WC "d_seteuid='" + perl_d_seteuid + "'"
2223 $ WC "d_setprior='" + perl_d_setprior + "'"
2224 $ WC "d_setregid='" + perl_d_setregid + "'"
2225 $ WC "d_setresgid='" + perl_d_setresgid + "'"
2226 $ WC "d_setreuid='" + perl_d_setreuid + "'"
2227 $ WC "d_setresuid='" + perl_d_setresuid + "'"
2228 $ WC "d_setrgid='" + perl_d_setrgid + "'"
2229 $ WC "d_setruid='" + perl_d_setruid + "'"
2230 $ WC "d_setsid='" + perl_d_setsid + "'"
2231 $ WC "d_shm='" + perl_d_shm + "'"
2232 $ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
2233 $ WC "d_sigaction='" + perl_d_sigaction + "'"
2234 $ WC "d_statblks='" + perl_d_statblks + "'"
2235 $ WC "stdio_ptr='" + perl_stdio_ptr + "'"
2236 $ WC "stdio_cnt='" + perl_stdio_cnt + "'"
2237 $ WC "stdio_base='" + perl_stdio_base + "'"
2238 $ WC "stdio_bufsiz='" + perl_stdio_bufsiz + "'"
2239 $ WC "d_strctcpy='" + perl_d_strctcpy + "'"
2240 $ WC "d_strerror='" + perl_d_strerror + "'"
2241 $ WC "d_syserrlst='" + perl_d_syserrlst + "'"
2242 $ WC "d_strerrm='" + perl_d_strerrm + "'"
2243 $ WC "d_symlink='" + perl_d_symlink + "'"
2244 $ WC "d_syscall='" + perl_d_syscall + "'"
2245 $ WC "d_system='" + perl_d_system + "'"
2246 $ WC "timetype='" + perl_timetype + "'"
2247 $ WC "d_truncate='" + perl_d_truncate + "'"
2248 $ WC "d_vfork='" + perl_d_vfork + "'"
2249 $ WC "signal_t='" + perl_signal_t + "'"
2250 $ WC "d_volatile='" + perl_d_volatile + "'"
2251 $ WC "d_vprintf='" + perl_d_vprintf + "'"
2252 $ WC "d_charvspr='" + perl_d_charvspr + "'"
2253 $ WC "d_wait4='" + perl_d_wait4 + "'"
2254 $ WC "d_waitpid='" + perl_d_waitpid + "'"
2255 $ WC "i_dirent='" + perl_i_dirent + "'"
2256 $ WC "d_dirnamlen='" + perl_d_dirnamlen + "'"
2257 $ WC "direntrytype='" + perl_direntrytype + "'"
2258 $ WC "i_fcntl='" + perl_i_fcntl + "'"
2259 $ WC "i_grp='" + perl_i_grp + "'"
2260 $ WC "i_limits='" + perl_i_limits + "'"
2261 $ WC "i_memory='" + perl_i_memory + "'"
2262 $ WC "i_ndbm='" + perl_i_ndbm + "'"
2263 $ WC "i_stdarg='" + perl_i_stdarg + "'"
2264 $ WC "i_pwd='" + perl_i_pwd + "'"
2265 $ WC "d_pwquota='" + perl_d_pwquota + "'"
2266 $ WC "d_pwage='" + perl_d_pwage + "'"
2267 $ WC "d_pwchange='" + perl_d_pwchange + "'"
2268 $ WC "d_pwclass='" + perl_d_pwclass + "'"
2269 $ WC "d_pwexpire='" + perl_d_pwexpire + "'"
2270 $ WC "d_pwcomment='" + perl_d_pwcomment + "'"
2271 $ WC "i_stddef='" + perl_i_stddef + "'"
2272 $ WC "i_stdlib='" + perl_i_stdlib + "'"
2273 $ WC "i_string='" + perl_i_string + "'"
2274 $ WC "i_sysdir='" + perl_i_sysdir + "'"
2275 $ WC "i_sysfile='" + perl_i_sysfile + "'"
2276 $ WC "i_sysioctl='" + perl_i_sysioctl + "'"
2277 $ WC "i_sysndir='" + perl_i_sysndir + "'"
2278 $ WC "i_sysresrc='" + perl_i_sysresrc + "'"
2279 $ WC "i_sysselct='" + perl_i_sysselct + "'"
2280 $ WC "i_dbm='" + perl_i_dbm + "'"
2281 $ WC "i_rpcsvcdbm='" + perl_i_rpcsvcdbm + "'"
2282 $ WC "i_sfio='" + perl_i_sfio + "'"
2283 $ WC "i_sysstat='" + perl_i_sysstat + "'"
2284 $ WC "i_systimes='" + perl_i_systimes + "'"
2285 $ WC "i_systypes='" + perl_i_systypes + "'"
2286 $ WC "i_sysun='" + perl_i_sysun + "'"
2287 $ WC "i_syswait='" + perl_i_syswait + "'"
2288 $ WC "i_termio='" + perl_i_termio + "'"
2289 $ WC "i_sgtty='" + perl_i_sgtty + "'"
2290 $ WC "i_termios='" + perl_i_termios + "'"
2291 $ WC "i_time='" + perl_i_time + "'"
2292 $ WC "i_systime='" + perl_i_systime + "'"
2293 $ WC "i_systimek='" + perl_i_systimek + "'"
2294 $ WC "i_unistd='" + perl_i_unistd + "'"
2295 $ WC "i_utime='" + perl_i_utime + "'"
2296 $ WC "i_varargs='" + perl_i_varargs + "'"
2297 $ WC "i_vfork='" + perl_i_vfork + "'"
2298 $ WC "prototype='" + perl_prototype + "'"
2299 $ WC "randbits='" + perl_randbits +"'"
2300 $ WC "selecttype='" + perl_selecttype + "'"
2301 $ WC "stdchar='" + perl_stdchar + "'"
2302 $ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
2303 $ WC "full_sed='" + perl_full_sed + "'"
2304 $ WC "bin='" + perl_bin + "'"
2305 $ WC "binexp='" + perl_binexp + "'"
2306 $ WC "d_alarm='" + perl_d_alarm + "'"
2307 $ WC "d_casti32='" + perl_d_casti32 + "'"
2308 $ WC "d_chown='" + perl_d_chown + "'"
2309 $ WC "d_chroot='" + perl_d_chroot + "'"
2310 $ WC "d_cuserid='" + perl_d_cuserid + "'"
2311 $ WC "d_dbl_dig='" + perl_d_dbl_dig + "'"
2312 $ WC "d_difftime='" + perl_d_difftime + "'"
2313 $ WC "d_fork='" + perl_d_fork + "'"
2314 $ WC "d_getlogin='" + perl_d_getlogin + "'"
2315 $ WC "d_getppid='" + perl_d_getppid + "'"
2316 $ WC "d_htonl='" + perl_d_htonl + "'"
2317 $ WC "d_nice='" + perl_d_nice + "'"
2318 $ WC "d_pause='" + perl_d_pause + "'"
2319 $ WC "d_pipe='" + perl_d_pipe + "'"
2320 $ WC "d_readlink='" + perl_d_readlink + "'"
2321 $ WC "d_setlinebuf='" + perl_d_setlinebuf + "'"
2322 $ WC "d_strchr='" + perl_d_strchr + "'"
2323 $ WC "d_index='" + perl_d_index + "'"
2324 $ WC "d_strtod='" + perl_d_strtod + "'"
2325 $ WC "d_strtol='" + perl_d_strtol + "'"
2326 $ WC "d_strtoul='" + perl_d_strtoul + "'"
2327 $ WC "d_tcgetpgrp='" + perl_d_tcgetpgrp + "'"
2328 $ WC "d_tcsetpgrp='" + perl_d_tcsetpgrp + "'"
2329 $ WC "d_times='" + perl_d_times + "'"
2330 $ WC "d_tzname='" + perl_d_tzname + "'"
2331 $ WC "d_umask='" + perl_d_umask + "'"
2332 $ WC "fpostype='" + perl_fpostype + "'"
2333 $ WC "i_dlfcn='" + perl_i_dlfcn + "'"
2334 $ WC "i_float='" + perl_i_float + "'"
2335 $ WC "i_math='" + perl_i_math + "'"
2336 $ WC "intsize='" + perl_intsize + "'"
2337 $ WC "longsize='" + perl_longsize + "'"
2338 $ WC "shortsize='" + perl_shortsize + "'"
2339 $ WC "lseektype='" + perl_lseektype + "'"
2340 $ WC "i_values='" + perl_i_values + "'"
2341 $ WC "malloctype='" + perl_malloctype + "'"
2342 $ WC "freetype='" + perl_freetype + "'"
2343 $ WC "d_mymalloc='" + perl_d_mymalloc + "'"
2344 $ WC "sh='" + perl_sh + "'"
2345 $ WC "sig_name='" + perl_sig_name + "'"
2346 $ WC "sig_num='" + perl_sig_num + "'"
2347 $ tempsym = "sig_name_init='" + perl_sig_name_with_commas + "'"
2348 $ WC/symbol tempsym
2349 $ WC "modetype='" + perl_modetype + "'"
2350 $ WC "ssizetype='" + perl_ssizetype + "'"
2351 $ WC "o_nonblock='" + perl_o_nonblock + "'"
2352 $ WC "eagain='" + perl_eagain + "'"
2353 $ WC "rd_nodata='" + perl_rd_nodata + "'"
2354 $ WC "d_eofnblk='" + perl_d_eofnblk + "'"
2355 $ WC "d_oldarchlib='" + perl_d_oldarchlib + "'"
2356 $ WC "oldarchlibexp='" + perl_oldarchlibexp + "'"
2357 $ WC "oldarchlib='" + perl_oldarchlib + "'"
2358 $ WC "privlibexp='" + perl_privlibexp + "'"
2359 $ WC "privlib='" + perl_privlib + "'"
2360 $ WC "sitelibexp='" + perl_sitelibexp + "'"
2361 $ WC "sitelib='" + perl_sitelib + "'"
2362 $ WC "sitearchexp='" + perl_sitearchexp + "'"
2363 $ WC "sitearch='" + perl_sitearch + "'"
2364 $ WC "sizetype='" + perl_sizetype + "'"
2365 $ WC "i_sysparam='" + perl_i_sysparam + "'"
2366 $ WC "d_void_closedir='" + perl_d_void_closedir + "'"
2367 $ WC "d_dlerror='" + perl_d_dlerror + "'"
2368 $ WC "d_dlsymun='" + perl_d_dlsymun + "'"
2369 $ WC "d_suidsafe='" + perl_d_suidsafe + "'"
2370 $ WC "d_dosuid='" + perl_d_dosuid + "'"
2371 $ WC "d_inetaton='" + perl_d_inetaton + "'"
2372 $ WC "d_isascii='" + perl_d_isascii + "'"
2373 $ WC "d_mkfifo='" + perl_d_mkfifo + "'"
2374 $ WC "d_pathconf='" + perl_d_pathconf + "'"
2375 $ WC "d_fpathconf='" + perl_d_fpathconf + "'"
2376 $ WC "d_safebcpy='" + perl_d_safebcpy + "'"
2377 $ WC "d_safemcpy='" + perl_d_safemcpy + "'"
2378 $ WC "d_sanemcmp='" + perl_d_sanemcmp + "'"
2379 $ WC "d_setpgrp='" + perl_d_setpgrp + "'"
2380 $ WC "d_bsdsetpgrp='" + perl_d_bsdsetpgrp + "'"
2381 $ WC "d_bsdpgrp='" + perl_d_bsdpgrp + "'"
2382 $ WC "d_setpgid='" + perl_d_setpgid + "'"
2383 $ WC "d_setpgrp2='" + perl_d_setpgrp2 + "'"
2384 $ WC "d_sysconf='" + perl_d_sysconf + "'"
2385 $ WC "d_Gconvert='" + perl_d_Gconvert + "'"
2386 $ WC "d_getpgid='" + perl_d_getpgid + "'"
2387 $ WC "d_getpgrp='" + perl_d_getpgrp + "'"
2388 $ WC "d_bsdgetpgrp='" + perl_d_bsdgetpgrp + "'"
2389 $ WC "d_getpgrp2='" + perl_d_getpgrp2 + "'"
2390 $ WC "d_sfio='" + perl_d_sfio + "'"
2391 $ WC "d_sigsetjmp='" + perl_d_sigsetjmp + "'"
2392 $ WC "usedl='" + perl_usedl + "'"
2393 $ WC "startperl=" + perl_startperl ! This one's special--no enclosing single quotes
2394 $ WC "db_hashtype='" + perl_db_hashtype + "'"
2395 $ WC "db_prefixtype='" + perl_db_prefixtype + "'"
2396 $ WC "useperlio='" + perl_useperlio + "'"
2397 $ WC "defvoidused='" + perl_defvoidused + "'"
2398 $ WC "voidflags='" + perl_voidflags + "'"
2399 $ WC "d_eunice='" + perl_d_eunice + "'"
2400 $ WC "libs='" + perl_libs + "'"
2401 $ WC "libc='" + perl_libc + "'"
2402 $ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
2403 $ WC tempstring
2404 $ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
2405 $ WC tempstring
2406 $ WC "pager='" + perl_pager + "'"
2407 $ WC "uidtype='" + perl_uidtype + "'"
2408 $ WC "gidtype='" + perl_gidtype + "'"
2409 $ WC "usethreads='" + perl_usethreads + "'"
2410 $ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
2411 $ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
2412 $ WC "d_gnulibc='" + perl_d_gnulibc + "'"
2413 $ WC "i_netdb='" + perl_i_netdb + "'"
2414 $ WC "pidtype='" + perl_pidtype + "'"
2415 $ WC "netdb_host_type='" + perl_netdb_host_type + "'"
2416 $ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
2417 $ WC "netdb_name_type='" + perl_netdb_name_type + "'"
2418 $ WC "netdb_net_type='" + perl_netdb_net_type + "'"
2419 $ WC "baserev='" + perl_baserev + "'"
2420 $ WC "doublesize='" + perl_doublesize + "'"
2421 $ WC "ptrsize='" + perl_ptrsize + "'"
2422 $ WC "d_gethbyaddr='" + perl_d_gethbyaddr + "'"
2423 $ WC "d_gethbyname='" + perl_d_gethbyname + "'"
2424 $ WC "d_getnbyaddr='" + perl_d_getnbyaddr + "'"
2425 $ WC "d_getnbyname='" + perl_d_getnbyname + "'"
2426 $ WC "d_getpbynumber='" + perl_d_getpbynumber + "'"
2427 $ WC "d_getpbyname='" + perl_d_getpbyname + "'"
2428 $ WC "d_getsbyport='" + perl_d_getsbyport + "'"
2429 $ WC "d_getsbyname='" + perl_d_getsbyname + "'"
2430 $ WC "d_sethent='" + perl_d_sethent + "'"
2431 $ WC "d_oldpthreads='" + perl_d_oldpthreads + "'"
2432 $ WC "d_longdbl='" + perl_d_longdbl + "'"
2433 $ WC "longdblsize='" + perl_longdblsize + "'"
2434 $ WC "d_longlong='" + perl_d_longlong + "'"
2435 $ WC "longlongsize='" + perl_longlongsize + "'"
2436 $ WC "d_mkstemp='" + perl_d_mkstemp + "'"
2437 $ WC "d_setvbuf='" + perl_d_setvbuf + "'"
2438 $ WC "d_endhent='" + perl_d_endhent + "'"
2439 $ WC "d_endnent='" + perl_d_endsent + "'"
2440 $ WC "d_endpent='" + perl_d_endpent + "'"
2441 $ WC "d_endsent='" + perl_d_endsent + "'"
2442 $ WC "d_gethent='" + perl_d_gethent + "'"
2443 $ WC "d_getnent='" + perl_d_getsent + "'"
2444 $ WC "d_getpent='" + perl_d_getpent + "'"
2445 $ WC "d_getsent='" + perl_d_getsent + "'"
2446 $ WC "d_sethent='" + perl_d_sethent + "'"
2447 $ WC "d_setnent='" + perl_d_setsent + "'"
2448 $ WC "d_setpent='" + perl_d_setpent + "'"
2449 $ WC "ebcdic='" + perl_ebcdic + "'"
2450 $ WC "d_setsent='" + perl_d_setsent + "'"
2451 $ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
2452 $ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
2453 $ WC "d_getprotoprotos='" + perl_d_getprotoprotos + "'"
2454 $ WC "d_getservprotos='" + perl_d_getservprotos + "'"
2455 $ WC "d_pwgecos='" + perl_d_pwgecos + "'"
2456 $ WC "d_sched_yield='" + perl_d_sched_yield + "'"
2457 $ WC "d_lchown='" + perl_d_lchown + "'"
2458 $ WC "d_union_semun='" + perl_d_union_semun + "'"
2459 $ WC "i_arpainet='" + perl_i_arpainet + "'"
2460 $ WC "d_grpasswd='" + perl_d_grpasswd + "'"
2461 $ WC "d_setgrent='" + perl_d_setgrent + "'"
2462 $ WC "d_getgrent='" + perl_d_getgrent + "'"
2463 $ WC "d_endgrent='" + perl_d_endgrent + "'"
2464 $ WC "d_pwpasswd='" + perl_d_pwpasswd + "'"
2465 $ WC "d_setpwent='" + perl_d_setpwent + "'"
2466 $ WC "d_getpwent='" + perl_d_getpwent + "'"
2467 $ WC "d_endpwent='" + perl_d_endpwent + "'"
2468 $ WC "d_semctl_semun='" + perl_d_semctl_semun + "'"
2469 $ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
2470 $ WC "extensions='" + perl_extensions + "'"
2471 $ WC "d_mknod='" + perl_d_mknod + "'"
2472 $ WC "devtype='" + perl_devtype + "'"
2473 $!
2474 $! ##WRITE NEW CONSTANTS HERE##
2475 $!
2476 $ Close CONFIGSH
2477 $
2478 $! Okay, we've gotten here. Build munchconfig and run it
2479 $ 'Perl_CC' munchconfig.c
2480 $ If (Needs_Opt.eqs."Yes")
2481 $ THEN
2482 $   open/write OPTCHAN []munchconfig.opt
2483 $   IF ("''using_gnu_c'".eqs."Yes")
2484 $   THEN
2485 $     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
2486 $   endif
2487 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
2488 $   Close OPTCHAN
2489 $   link munchconfig.obj,munchconfig.opt/opt
2490 $   delete munchconfig.opt;*
2491 $ else
2492 $   link munchconfig.obj
2493 $ endif
2494 $ WRITE_RESULT "Writing config.h"
2495 $ !
2496 $ ! we need an fdl file
2497 $ CREATE [-]CONFIG.FDL
2498 RECORD
2499   FORMAT STREAM_LF
2500 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
2501 $ ! First spit out the header info with the local defines (to get
2502 $ ! around the 255 character command line limit)
2503 $ OPEN/APPEND CONFIG [-]config.local
2504 $ if use_debugging_perl.eqs."Y"
2505 $ THEN
2506 $   WRITE CONFIG "#define DEBUGGING"
2507 $ ENDIF
2508 $ if preload_env.eqs."Y"
2509 $ THEN
2510 $    WRITE CONFIG "#define PRIME_ENV_AT_STARTUP"
2511 $ ENDIF
2512 $ if use_two_pot_malloc.eqs."Y"
2513 $ THEN
2514 $    WRITE CONFIG "#define TWO_POT_OPTIMIZE"
2515 $ endif
2516 $ if mymalloc.eqs."Y"
2517 $ THEN
2518 $    WRITE CONFIG "#define EMBEDMYMALLOC"
2519 $ ENDIF
2520 $ if use_pack_malloc.eqs."Y"
2521 $ THEN
2522 $    WRITE CONFIG "#define PACK_MALLOC"
2523 $ endif
2524 $ if use_debugmalloc.eqs."Y"
2525 $ THEN
2526 $    write config "#define DEBUGGING_MSTATS"
2527 $ ENDIF
2528 $ if "''Using_Gnu_C'" .eqs."Yes"
2529 $ THEN
2530 $   WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
2531 $ ENDIF
2532 $ if "''Has_Dec_C_Sockets'".eqs."T"
2533 $ THEN
2534 $    WRITE CONFIG "#define VMS_DO_SOCKETS"
2535 $    WRITE CONFIG "#define DECCRTL_SOCKETS"
2536 $ ENDIF
2537 $ if "''Has_Socketshr'".eqs."T"
2538 $ THEN
2539 $    WRITE CONFIG "#define VMS_DO_SOCKETS"
2540 $ ENDIF
2541 $ CLOSE CONFIG
2542 $!
2543 $! Now build the normal config.h
2544 $ define/user sys$output [-]config.main
2545 $ mcr []munchconfig [-]config.sh [-]config_h.sh
2546 $ ! Concatenate them together
2547 $ copy [-]config.local,[-]config.main [-]config.h
2548 $! Clean up
2549 $ DELETE/NOLOG [-]CONFIG.MAIN;*
2550 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
2551 $ DELETE/NOLOG [-]CONFIG.FDL;*
2552 $!
2553 $ if "''Using_Dec_C'" .eqs."Yes"
2554 $ THEN
2555 $ DECC_REPLACE = "DECC=decc=1"
2556 $ ELSE
2557 $ DECC_REPLACE = "DECC=" 
2558 $ ENDIF
2559 $ if "''Using_Gnu_C'" .eqs."Yes"
2560 $ THEN
2561 $ GNUC_REPLACE = "GNUC=gnuc=1"
2562 $ ELSE
2563 $ GNUC_REPLACE = "GNUC=" 
2564 $ ENDIF
2565 $ if "''Has_Dec_C_Sockets'" .eqs."T"
2566 $ THEN
2567 $   SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
2568 $ ELSE
2569 $   if "''Has_Socketshr'" .eqs."T"
2570 $   THEN
2571 $     SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
2572 $   ELSE
2573 $     SOCKET_REPLACE = "SOCKET="
2574 $   ENDIF
2575 $ ENDIF
2576 $ IF ("''Use_Threads'".eqs."T")
2577 $ THEN
2578 $   if ("''VMS_VER'".LES."6.2")
2579 $   THEN
2580 $     THREAD_REPLACE = "THREAD=OLDTHREADED=1"
2581 $   ELSE
2582 $     THREAD_REPLACE = "THREAD=THREADED=1"
2583 $   ENDIF
2584 $ ELSE
2585 $   THREAD_REPLACE = "THREAD="
2586 $ ENDIF
2587 $ if mymalloc.eqs."Y"
2588 $ THEN
2589 $   MALLOC_REPLACE = "MALLOC=MALLOC=1"
2590 $ ELSE
2591 $   MALLOC_REPLACE = "MALLOC="
2592 $ ENDIF
2593 $ if f$getsyi("HW_MODEL").ge.1024
2594 $ THEN
2595 $ ARCH_TYPE = "ARCH-TYPE=__AXP__"
2596 $ ELSE
2597 $ ARCH_TYPE = "ARCH-TYPE=__VAX__"
2598 $ ENDIF
2599 $ WRITE_RESULT "Writing DESCRIP.MMS"
2600 $!set ver
2601 $ define/user sys$output [-]descrip.mms
2602 $ 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'"
2603 $! set nover
2604 $!
2605 $! Clean up after ourselves
2606 $ delete/nolog munchconfig.exe;*
2607 $ delete/nolog munchconfig.obj;*