xref: /freebsd/crypto/openssl/VMS/test-includes.com (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1*e0c4386eSCy Schubert$! Quick script to check how well including individual header files works
2*e0c4386eSCy Schubert$! on VMS, even when the VMS macro isn't defined.
3*e0c4386eSCy Schubert$
4*e0c4386eSCy Schubert$	sav_def = f$env("DEFAULT")
5*e0c4386eSCy Schubert$	here = f$parse("A.;0",f$ENV("PROCEDURE")) - "A.;0"
6*e0c4386eSCy Schubert$	set default 'here'
7*e0c4386eSCy Schubert$	set default [-.include.openssl]
8*e0c4386eSCy Schubert$	define openssl 'f$env("DEFAULT")'
9*e0c4386eSCy Schubert$	set default [--]
10*e0c4386eSCy Schubert$
11*e0c4386eSCy Schubert$ loop:
12*e0c4386eSCy Schubert$	f = f$search("openssl:*.h")
13*e0c4386eSCy Schubert$	if f .eqs. "" then goto loop_end
14*e0c4386eSCy Schubert$	write sys$output "Checking ",f
15*e0c4386eSCy Schubert$	open/write foo foo.c
16*e0c4386eSCy Schubert$	write foo "#undef VMS"
17*e0c4386eSCy Schubert$	write foo "#include <stdio.h>"
18*e0c4386eSCy Schubert$	write foo "#include <openssl/",f$parse(f,,,"NAME"),".h>"
19*e0c4386eSCy Schubert$	write foo "main()"
20*e0c4386eSCy Schubert$	write foo "{printf(""foo\n"");}"
21*e0c4386eSCy Schubert$	close foo
22*e0c4386eSCy Schubert$	cc/STANDARD=ANSI89/NOLIST/PREFIX=ALL foo.c
23*e0c4386eSCy Schubert$	delete foo.c;
24*e0c4386eSCy Schubert$	goto loop
25*e0c4386eSCy Schubert$ loop_end:
26*e0c4386eSCy Schubert$	set default 'save_def'
27*e0c4386eSCy Schubert$	exit
28*e0c4386eSCy Schubert
29