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