$ X509 = openssl + " x509"
$ PKCS12 = openssl + " pkcs12"
$ echo = "write sys$Output"
+$ RET = 1
+$!
+$! 2010-12-20 SMS.
+$! Use a concealed logical name to reduce command line lengths, to
+$! avoid DCL errors on VAX:
+$! %DCL-W-TKNOVF, command element is too long - shorten
+$! (Path segments like "openssl-1_0_1-stable-SNAP-20101217" accumulate
+$! quickly.)
+$!
+$ CATOP = F$PARSE( F$ENVIRONMENT( "DEFAULT"), "[]")- "].;"+ ".demoCA.]"
+$ define /translation_attributes = concealed CATOP 'CATOP'
$!
-$ s = F$PARSE(F$ENVIRONMENT("DEFAULT"),"[]") - "].;"
-$ CATOP := 's'.demoCA
-$ CAKEY := ]cakey.pem
-$ CACERT := ]cacert.pem
+$ on error then goto clean_up
+$ on control_y then goto clean_up
+$!
+$ CAKEY = "CATOP:[private]cakey.pem"
+$ CACERT = "CATOP:[000000]cacert.pem"
$
$ __INPUT := SYS$COMMAND
-$ RET = 1
$!
$ i = 1
$opt_loop:
$ IF (prog_opt .EQS. "?" .OR. prog_opt .EQS. "-h" .OR. prog_opt .EQS. "-help")
$ THEN
$ echo "usage: CA -newcert|-newreq|-newca|-sign|-verify"
-$ exit
+$ goto clean_up
$ ENDIF
$!
$ IF (prog_opt .EQS. "-input")
$ IF (prog_opt .EQS. "-newcert")
$ THEN
$ ! Create a certificate.
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ REQ -new -x509 -keyout newreq.pem -out newreq.pem 'DAYS'
$ RET=$STATUS
$ echo "Certificate (and private key) is in newreq.pem"
$ IF (prog_opt .EQS. "-newreq")
$ THEN
$ ! Create a certificate request
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ REQ -new -keyout newreq.pem -out newreq.pem 'DAYS'
$ RET=$STATUS
$ echo "Request (and private key) is in newreq.pem"
$ THEN
$ ! If explicitly asked for or it doesn't exist then setup the directory
$ ! structure that Eric likes to manage things.
-$ IF F$SEARCH(CATOP+"]serial.") .EQS. ""
+$ IF F$SEARCH( "CATOP:[000000]serial.") .EQS. ""
$ THEN
-$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP']
-$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.certs]
-$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.crl]
-$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.newcerts]
-$ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.private]
+$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[000000]
+$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[certs]
+$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[crl]
+$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[newcerts]
+$ CREATE /DIRECTORY /PROTECTION=OWNER:RWED CATOP:[private]
$
-$ OPEN /WRITE ser_file 'CATOP']serial.
+$ OPEN /WRITE ser_file CATOP:[000000]serial.
$ WRITE ser_file "01"
$ CLOSE ser_file
-$ APPEND/NEW NL: 'CATOP']index.txt
+$ APPEND /NEW_VERSION NL: CATOP:[000000]index.txt
$
$ ! The following is to make sure access() doesn't get confused. It
$ ! really needs one file in the directory to give correct answers...
-$ COPY NLA0: 'CATOP'.certs].;
-$ COPY NLA0: 'CATOP'.crl].;
-$ COPY NLA0: 'CATOP'.newcerts].;
-$ COPY NLA0: 'CATOP'.private].;
+$ COPY NLA0: CATOP:[certs].;
+$ COPY NLA0: CATOP:[crl].;
+$ COPY NLA0: CATOP:[newcerts].;
+$ COPY NLA0: CATOP:[private].;
$ ENDIF
$!
-$ IF F$SEARCH(CATOP+".private"+CAKEY) .EQS. ""
+$ IF F$SEARCH( CAKEY) .EQS. ""
$ THEN
$ READ '__INPUT' FILE -
- /PROMPT="CA certificate filename (or enter to create): "
+ /PROMPT="CA certificate filename (or enter to create): "
$ IF (FILE .NES. "") .AND. (F$SEARCH(FILE) .NES. "")
$ THEN
-$ COPY 'FILE' 'CATOP'.private'CAKEY'
-$ RET=$STATUS
+$ COPY 'FILE' 'CAKEY'
+$ RET=$STATUS
$ ELSE
$ echo "Making CA certificate ..."
-$ DEFINE/USER SYS$INPUT '__INPUT'
-$ REQ -new -x509 -keyout 'CATOP'.private'CAKEY' -
- -out 'CATOP''CACERT' 'DAYS'
-$ RET=$STATUS
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
+$ REQ -new -x509 -keyout 'CAKEY' -out 'CACERT' 'DAYS'
+$ RET=$STATUS
$ ENDIF
$ ENDIF
$ GOTO opt_loop_continue
$ i = i + 1
$ cname = P'i'
$ IF cname .EQS. "" THEN cname = "My certificate"
-$ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CATOP''CACERT -
- -out newcert.p12 -export -name "''cname'"
+$ PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CACERT' -
+ -out newcert.p12 -export -name "''cname'"
$ RET=$STATUS
-$ exit RET
+$ goto clean_up
$ ENDIF
$!
$ IF (prog_opt .EQS. "-xsign")
$ THEN
$!
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ CA -policy policy_anything -infiles newreq.pem
$ RET=$STATUS
$ GOTO opt_loop_continue
$ IF ((prog_opt .EQS. "-sign") .OR. (prog_opt .EQS. "-signreq"))
$ THEN
$!
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ CA -policy policy_anything -out newcert.pem -infiles newreq.pem
$ RET=$STATUS
$ type newcert.pem
$ THEN
$!
$ echo "Cert passphrase will be requested twice - bug?"
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ X509 -x509toreq -in newreq.pem -signkey newreq.pem -out tmp.pem
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ CA -policy policy_anything -out newcert.pem -infiles tmp.pem
y
y
$ i = i + 1
$ IF (p'i' .EQS. "")
$ THEN
-$ DEFINE/USER SYS$INPUT '__INPUT'
-$ VERIFY "-CAfile" 'CATOP''CACERT' newcert.pem
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
+$ VERIFY "-CAfile" 'CACERT' newcert.pem
$ ELSE
$ j = i
$ verify_opt_loop:
$ IF j .GT. 8 THEN GOTO verify_opt_loop_end
$ IF p'j' .NES. ""
$ THEN
-$ DEFINE/USER SYS$INPUT '__INPUT'
+$ DEFINE /USER_MODE SYS$INPUT '__INPUT'
$ __tmp = p'j'
-$ VERIFY "-CAfile" 'CATOP''CACERT' '__tmp'
+$ VERIFY "-CAfile" 'CACERT' '__tmp'
$ tmp=$STATUS
$ IF tmp .NE. 0 THEN RET=tmp
$ ENDIF
$ THEN
$!
$ echo "Unknown argument ''prog_opt'"
-$
-$ EXIT 3
+$ RET = 3
+$ goto clean_up
$ ENDIF
$
$opt_loop_continue:
$ GOTO opt_loop
$
$opt_loop_end:
+$!
+$clean_up:
+$!
+$ if f$trnlnm( "CATOP", "LNM$PROCESS") .nes. "" then -
+ deassign /process CATOP
+$!
$ EXIT 'RET'
$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$! Supported values are:
$!
-$! "" Compile with default (/NOPOINTER_SIZE)
-$! 32 Compile with /POINTER_SIZE=32 (SHORT)
-$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
+$! "" Compile with default (/NOPOINTER_SIZE)
+$! 32 Compile with /POINTER_SIZE=32 (SHORT)
+$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
$! (Automatically select ARGV if compiler supports it.)
$! 64= Compile with /POINTER_SIZE=64 (LONG).
$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
$!
$ IF (P6 .EQS. "32")
$ THEN
-$ POINTER_SIZE = "/POINTER_SIZE=32"
+$ POINTER_SIZE = " /POINTER_SIZE=32"
$ ELSE
$ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE")
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
$ LIB32 = ""
$ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=")
$ THEN
-$! Explicit user choice: "64" or "64=ARGV".
-$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
+$! Explicit user choice: "64" or "64=ARGV".
+$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
$ ELSE
-$ SET NOON
+$ SET NOON
$ DEFINE /USER_MODE SYS$OUTPUT NL:
$ DEFINE /USER_MODE SYS$ERROR NL:
$ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL:
-$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
-$ THEN
-$ ! If we got here, it means DCL complained like this:
-$ ! %DCL-W-NOVALU, value not allowed - remove value specification
-$ ! \64=\
-$ !
-$ ! If the compiler was run, logicals defined in /USER would
-$ ! have been deassigned automatically. However, when DCL
-$ ! complains, they aren't, so we do it here (it might be
-$ ! unnecessary, but just in case there will be another error
-$ ! message further on that we don't want to miss)
+$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
+$ THEN
+$ ! If we got here, it means DCL complained like this:
+$ ! %DCL-W-NOVALU, value not allowed - remove value specification
+$ ! \64=\
+$ !
+$ ! If the compiler was run, logicals defined in /USER would
+$ ! have been deassigned automatically. However, when DCL
+$ ! complains, they aren't, so we do it here (it might be
+$ ! unnecessary, but just in case there will be another error
+$ ! message further on that we don't want to miss)
$ DEASSIGN /USER_MODE SYS$ERROR
$ DEASSIGN /USER_MODE SYS$OUTPUT
-$ ELSE
-$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
-$ ENDIF
-$ SET ON
+$ ELSE
+$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
+$ ENDIF
+$ SET ON
$ ENDIF
-$ POINTER_SIZE = "/POINTER_SIZE=''POINTER_SIZE'"
+$ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'"
$!
$ ELSE
$!
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
$ CCEXTRAFLAGS = ""
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
-$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
+$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
$!
$ CC = "CC"
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC/DECC"
-$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
+$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
+ " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$!
$ THEN
$ IF CCDISABLEWARNINGS .NES. ""
$ THEN
-$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
$ ENDIF
$ ELSE
$ CCDISABLEWARNINGS = ""
$ ENDIF
-$ CC2 = CC + "/DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
-$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
+$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
$!
$! Show user the result
$!
$! fully compiled library.
$!
$! P7, if defined, specifies the C pointer size. Ignored on VAX.
+$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$! Supported values are:
$!
-$! "" Compile with default (/NOPOINTER_SIZE)
-$! 32 Compile with /POINTER_SIZE=32 (SHORT)
+$! "" Compile with default (/NOPOINTER_SIZE)
+$! 32 Compile with /POINTER_SIZE=32 (SHORT)
$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
$! (Automatically select ARGV if compiler supports it.)
$! 64= Compile with /POINTER_SIZE=64 (LONG).
$!
$ IF (P7 .EQS. "32")
$ THEN
-$ POINTER_SIZE = "/POINTER_SIZE=32"
+$ POINTER_SIZE = " /POINTER_SIZE=32"
$ ELSE
$ POINTER_SIZE = F$EDIT( P7, "COLLAPSE, UPCASE")
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
$ THEN
$ ARCHD = ARCH+ "_64"
$ LIB32 = ""
-$ POINTER_SIZE = "/POINTER_SIZE=64"
+$ POINTER_SIZE = " /POINTER_SIZE=64"
$ ELSE
$!
$! Tell The User Entered An Invalid Option.
$ CC = "CC"
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC/DECC"
-$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
+$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- "/INCLUDE=(''CC_INCLUDES')"+ -
+ " /INCLUDE=(''CC_INCLUDES')"+ -
CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$ ELSE
$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
$ CC6DISABLEWARNINGS = CCDISABLEWARNINGS + ",MIXLINKAGE"
-$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
$ ENDIF
-$ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
-$ CC6DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))"
+$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
+$ CC6DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC6DISABLEWARNINGS + "))"
$ ELSE
$ CCDISABLEWARNINGS = ""
$ CC4DISABLEWARNINGS = ""
$ CC6DISABLEWARNINGS = ""
$ ENDIF
-$ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
-$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
+$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
$ IF ARCH .EQS. "VAX" .AND. COMPILER .EQS. "DECC" .AND. P2 .NES. "DEBUG"
$ THEN
-$ CC5 = CC + "/OPTIMIZE=NODISJOINT"
+$ CC5 = CC + " /OPTIMIZE=NODISJOINT"
$ CC5_DIFFERENT = 1
$ ELSE
$ CC5 = CC
$! all available engines are built.
$!
$! P7, if defined, specifies the C pointer size. Ignored on VAX.
+$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$! Supported values are:
$!
$! "" Compile with default (/NOPOINTER_SIZE)
$!
$ IF (OPT_POINTER_SIZE .EQS. "32")
$ THEN
-$ POINTER_SIZE = "/POINTER_SIZE=32"
+$ POINTER_SIZE = " /POINTER_SIZE=32"
$ ELSE
$ POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE")
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
$ THEN
$ ARCHD = ARCH+ "_64"
$ LIB32 = ""
-$ POINTER_SIZE = "/POINTER_SIZE=64"
+$ POINTER_SIZE = " /POINTER_SIZE=64"
$ ELSE
$!
$! Tell The User Entered An Invalid Option.
$ CC = "CC"
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC/DECC"
-$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
+$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- "/INCLUDE=(''CC_INCLUDES')" + -
+ " /INCLUDE=(''CC_INCLUDES') " + -
CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$ THEN
$ IF CCDISABLEWARNINGS .NES. ""
$ THEN
-$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
$ ENDIF
$ ELSE
$ CCDISABLEWARNINGS = ""
$ ENDIF
-$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
$!
$! Show user the result
$!
$!
$! P2, if defined, specifies the C pointer size. Ignored on VAX.
$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
-$! Supported values are:
+$! Supported values are:
$!
$! "" Compile with default (/NOPOINTER_SIZE).
$! 32 Compile with /POINTER_SIZE=32 (SHORT).
$! P5, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up)
$!
$! P6, if defined, specifies the C pointer size. Ignored on VAX.
+$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$! Supported values are:
$!
-$! "" Compile with default (/NOPOINTER_SIZE)
-$! 32 Compile with /POINTER_SIZE=32 (SHORT)
-$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
+$! "" Compile with default (/NOPOINTER_SIZE)
+$! 32 Compile with /POINTER_SIZE=32 (SHORT)
+$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
$! (Automatically select ARGV if compiler supports it.)
$! 64= Compile with /POINTER_SIZE=64 (LONG).
$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
$!
$! Tell The User We Are Creating The SSL_TASK.
$!
+$! Tell The User We Are Creating The SSL_TASK.
+$!
$ WRITE SYS$OUTPUT "Creating SSL_TASK OSU HTTP SSL Engine."
$!
$! Tell The User What File We Are Compiling.
$ if (.not. CC5_SHOWN)
$ then
$ CC5_SHOWN = 1
-$ write sys$output " \Using special rule (5)"
-$ x = " "+ CC5
-$ write /symbol sys$output x
+$ write sys$output " \Using special rule (5)"
+$ x = " "+ CC5
+$ write /symbol sys$output x
$ endif
$ CC5 /OBJECT='OBJ_DIR''FILE_NAME'.OBJ SYS$DISK:[]'FILE_NAME'.C
$ ELSE
$!
$ IF (P6 .EQS. "32")
$ THEN
-$ POINTER_SIZE = "/POINTER_SIZE=32"
+$ POINTER_SIZE = " /POINTER_SIZE=32"
$ ELSE
$ POINTER_SIZE = F$EDIT( P6, "COLLAPSE, UPCASE")
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
$ THEN
$ ARCHD = ARCH+ "_64"
$ LIB32 = ""
-$ POINTER_SIZE = "/POINTER_SIZE=64"
+$ POINTER_SIZE = " /POINTER_SIZE=64"
$ ELSE
$!
$! Tell The User Entered An Invalid Option.
$ CC = "CC"
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC/DECC"
-$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
+$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
+ " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$!
$ CC4DISABLEWARNINGS = "DOLLARID"
$ ELSE
$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
-$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
$ ENDIF
-$ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
+$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
$ ELSE
$ CCDISABLEWARNINGS = ""
$ CC4DISABLEWARNINGS = ""
$ ENDIF
-$ CC2 = CC + "/DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
-$ CC3 = CC + "/DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
-$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$ CC2 = CC + " /DEFINE=(" + CCDEFS + ",_POSIX_C_SOURCE)" + CCDISABLEWARNINGS
+$ CC3 = CC + " /DEFINE=(" + CCDEFS + ISSEVEN + ")" + CCDISABLEWARNINGS
+$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
$ IF COMPILER .EQS. "DECC"
$ THEN
$ CC4 = CC - CCDISABLEWARNINGS + CC4DISABLEWARNINGS
$!
$!
$! P5, if defined, specifies the C pointer size. Ignored on VAX.
+$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
$! Supported values are:
$!
-$! "" Compile with default (/NOPOINTER_SIZE)
-$! 32 Compile with /POINTER_SIZE=32 (SHORT)
-$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
+$! "" Compile with default (/NOPOINTER_SIZE)
+$! 32 Compile with /POINTER_SIZE=32 (SHORT)
+$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV])
$! (Automatically select ARGV if compiler supports it.)
$! 64= Compile with /POINTER_SIZE=64 (LONG).
$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
$!
$ IF (P5 .EQS. "32")
$ THEN
-$ POINTER_SIZE = "/POINTER_SIZE=32"
+$ POINTER_SIZE = " /POINTER_SIZE=32"
$ ELSE
$ POINTER_SIZE = F$EDIT( P5, "COLLAPSE, UPCASE")
$ IF ((POINTER_SIZE .EQS. "64") .OR. -
$ LIB32 = ""
$ IF (F$EXTRACT( 2, 1, POINTER_SIZE) .EQS. "=")
$ THEN
-$! Explicit user choice: "64" or "64=ARGV".
-$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
+$! Explicit user choice: "64" or "64=ARGV".
+$ IF (POINTER_SIZE .EQS. "64=") THEN POINTER_SIZE = "64"
$ ELSE
-$ SET NOON
+$ SET NOON
$ DEFINE /USER_MODE SYS$OUTPUT NL:
$ DEFINE /USER_MODE SYS$ERROR NL:
$ CC /NOLIST /NOOBJECT /POINTER_SIZE=64=ARGV NL:
-$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
-$ THEN
-$ ! If we got here, it means DCL complained like this:
-$ ! %DCL-W-NOVALU, value not allowed - remove value specification
-$ ! \64=\
-$ !
-$ ! If the compiler was run, logicals defined in /USER would
-$ ! have been deassigned automatically. However, when DCL
-$ ! complains, they aren't, so we do it here (it might be
-$ ! unnecessary, but just in case there will be another error
-$ ! message further on that we don't want to miss)
+$ IF ($STATUS .AND. %X0FFF0000) .EQ. %X00030000
+$ THEN
+$ ! If we got here, it means DCL complained like this:
+$ ! %DCL-W-NOVALU, value not allowed - remove value specification
+$ ! \64=\
+$ !
+$ ! If the compiler was run, logicals defined in /USER would
+$ ! have been deassigned automatically. However, when DCL
+$ ! complains, they aren't, so we do it here (it might be
+$ ! unnecessary, but just in case there will be another error
+$ ! message further on that we don't want to miss)
$ DEASSIGN /USER_MODE SYS$ERROR
$ DEASSIGN /USER_MODE SYS$OUTPUT
-$ ELSE
-$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
-$ ENDIF
-$ SET ON
+$ ELSE
+$ POINTER_SIZE = POINTER_SIZE + "=ARGV"
+$ ENDIF
+$ SET ON
$ ENDIF
-$ POINTER_SIZE = "/POINTER_SIZE=''POINTER_SIZE'"
+$ POINTER_SIZE = " /POINTER_SIZE=''POINTER_SIZE'"
$ ELSE
$!
$! Tell The User Entered An Invalid Option.
$ IF F$TYPE(USER_CCDEFS) .NES. "" THEN CCDEFS = CCDEFS + "," + USER_CCDEFS
$ CCEXTRAFLAGS = ""
$ IF F$TYPE(USER_CCFLAGS) .NES. "" THEN CCEXTRAFLAGS = USER_CCFLAGS
-$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
+$ CCDISABLEWARNINGS = "" !!! "LONGLONGTYPE,LONGLONGSUFX,FOUNDCR"
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
$!
$ CC = "CC"
$ IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
THEN CC = "CC /DECC"
-$ CC = CC + "/''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
+$ CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
"''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- "/INCLUDE=(''CC_INCLUDES')" + CCEXTRAFLAGS
+ " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$!
$ CC4DISABLEWARNINGS = "DOLLARID"
$ ELSE
$ CC4DISABLEWARNINGS = CCDISABLEWARNINGS + ",DOLLARID"
-$ CCDISABLEWARNINGS = "/WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
+$ CCDISABLEWARNINGS = " /WARNING=(DISABLE=(" + CCDISABLEWARNINGS + "))"
$ ENDIF
-$ CC4DISABLEWARNINGS = "/WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
+$ CC4DISABLEWARNINGS = " /WARNING=(DISABLE=(" + CC4DISABLEWARNINGS + "))"
$ ELSE
$ CCDISABLEWARNINGS = ""
$ CC4DISABLEWARNINGS = ""
$ ENDIF
-$ CC = CC + "/DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
+$ CC = CC + " /DEFINE=(" + CCDEFS + ")" + CCDISABLEWARNINGS
$!
$! Show user the result
$!