summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-09-06 12:15:52 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-09-06 12:15:52 +0000
commit07c716f7d0c98c31bc9661ecc032ff38a0315948 (patch)
treed76ba3e02af60acb73536616fddc05838751ca8d /lib
parentfc13636e34ab3f7f3db4b1111220517ae088ef4e (diff)
import of OpenSSL 0.9.8h
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/Netware/build.bat7
-rw-r--r--lib/libssl/src/crypto/LPdir_vms.c49
-rw-r--r--lib/libssl/src/crypto/LPdir_win.c2
-rw-r--r--lib/libssl/src/engines/makeengines.com425
-rwxr-xr-xlib/libssl/src/ms/do_win64a.bat28
-rwxr-xr-xlib/libssl/src/ms/do_win64i.bat18
-rw-r--r--lib/libssl/src/ms/uplink.c3
-rw-r--r--lib/libssl/src/ms/uplink.h4
8 files changed, 145 insertions, 391 deletions
diff --git a/lib/libssl/src/Netware/build.bat b/lib/libssl/src/Netware/build.bat
index 3125c2a4875..823134bda16 100644
--- a/lib/libssl/src/Netware/build.bat
+++ b/lib/libssl/src/Netware/build.bat
@@ -159,8 +159,6 @@ cd ..\..\..
echo SHA1
cd crypto\sha\asm
perl sha1-586.pl %ASM_MODE% > s1-nw.asm
-perl sha256-586.pl %ASM_MODE% > sha256-nw.asm
-perl sha512-586.pl %ASM_MODE% > sha512-nw.asm
cd ..\..\..
echo RIPEMD160
@@ -173,11 +171,6 @@ cd crypto\rc5\asm
perl rc5-586.pl %ASM_MODE% > r5-nw.asm
cd ..\..\..
-echo WHIRLPOOL
-cd crypto\whrlpool\asm
-perl wp-mmx.pl %ASM_MODE% > wp-nw.asm
-cd ..\..\..
-
echo CPUID
cd crypto
perl x86cpuid.pl %ASM_MODE% > x86cpuid-nw.asm
diff --git a/lib/libssl/src/crypto/LPdir_vms.c b/lib/libssl/src/crypto/LPdir_vms.c
index 7613bd254e7..85b427a623b 100644
--- a/lib/libssl/src/crypto/LPdir_vms.c
+++ b/lib/libssl/src/crypto/LPdir_vms.c
@@ -40,18 +40,22 @@
#ifndef LPDIR_H
#include "LPdir.h"
#endif
-#include "vms_rms.h"
-/* Some compiler options hide EVMSERR. */
+/* Because some compiler options hide this macor */
#ifndef EVMSERR
-# define EVMSERR 65535 /* error for non-translatable VMS errors */
+#define EVMSERR 65535 /* error for non-translatable VMS errors */
#endif
struct LP_dir_context_st
{
unsigned long VMS_context;
- char filespec[ NAMX_MAXRSS+ 1];
- char result[ NAMX_MAXRSS+ 1];
+#ifdef NAML$C_MAXRSS
+ char filespec[NAML$C_MAXRSS+1];
+ char result[NAML$C_MAXRSS+1];
+#else
+ char filespec[256];
+ char result[256];
+#endif
struct dsc$descriptor_d filespec_dsc;
struct dsc$descriptor_d result_dsc;
};
@@ -62,16 +66,6 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
char *p, *r;
size_t l;
unsigned long flags = 0;
-
-/* Arrange 32-bit pointer to (copied) string storage, if needed. */
-#if __INITIAL_POINTER_SIZE == 64
-# pragma pointer_size save
-# pragma pointer_size 32
- char *ctx_filespec_32p;
-# pragma pointer_size restore
- char ctx_filespec_32[ NAMX_MAXRSS+ 1];
-#endif /* __INITIAL_POINTER_SIZE == 64 */
-
#ifdef NAML$C_MAXRSS
flags |= LIB$M_FIL_LONG_NAMES;
#endif
@@ -99,7 +93,13 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
filespeclen += 4; /* "*.*;" */
- if (filespeclen > NAMX_MAXRSS)
+ if (filespeclen >
+#ifdef NAML$C_MAXRSS
+ NAML$C_MAXRSS
+#else
+ 255
+#endif
+ )
{
errno = ENAMETOOLONG;
return 0;
@@ -115,21 +115,14 @@ const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
strcpy((*ctx)->filespec,directory);
strcat((*ctx)->filespec,"*.*;");
-
-/* Arrange 32-bit pointer to (copied) string storage, if needed. */
-#if __INITIAL_POINTER_SIZE == 64
-# define CTX_FILESPEC ctx_filespec_32p
- /* Copy the file name to storage with a 32-bit pointer. */
- ctx_filespec_32p = ctx_filespec_32;
- strcpy( ctx_filespec_32p, (*ctx)->filespec);
-#else /* __INITIAL_POINTER_SIZE == 64 */
-# define CTX_FILESPEC (*ctx)->filespec
-#endif /* __INITIAL_POINTER_SIZE == 64 [else] */
-
(*ctx)->filespec_dsc.dsc$w_length = filespeclen;
(*ctx)->filespec_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
(*ctx)->filespec_dsc.dsc$b_class = DSC$K_CLASS_S;
- (*ctx)->filespec_dsc.dsc$a_pointer = CTX_FILESPEC;
+ (*ctx)->filespec_dsc.dsc$a_pointer = (*ctx)->filespec;
+ (*ctx)->result_dsc.dsc$w_length = 0;
+ (*ctx)->result_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ (*ctx)->result_dsc.dsc$b_class = DSC$K_CLASS_D;
+ (*ctx)->result_dsc.dsc$a_pointer = 0;
}
(*ctx)->result_dsc.dsc$w_length = 0;
diff --git a/lib/libssl/src/crypto/LPdir_win.c b/lib/libssl/src/crypto/LPdir_win.c
index 702dbc730f6..09b475beed1 100644
--- a/lib/libssl/src/crypto/LPdir_win.c
+++ b/lib/libssl/src/crypto/LPdir_win.c
@@ -54,6 +54,8 @@ struct LP_dir_context_st
const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
{
+ struct dirent *direntry = NULL;
+
if (ctx == NULL || directory == NULL)
{
errno = EINVAL;
diff --git a/lib/libssl/src/engines/makeengines.com b/lib/libssl/src/engines/makeengines.com
index 6329fbbf03a..4a7474e0107 100644
--- a/lib/libssl/src/engines/makeengines.com
+++ b/lib/libssl/src/engines/makeengines.com
@@ -1,11 +1,11 @@
$!
-$! MAKEENGINES.COM
+$! MAKEAPPS.COM
$! Written By: Richard Levitte
$! richard@levitte.org
$!
$! This command file compiles and creates the various engines in form
$! of shared images. They are placed in [.xxx.EXE.ENGINES], where "xxx"
-$! is ALPHA, IA64 or VAX, depending on your hardware.
+$! is either AXP or VAX depending on your hardware.
$!
$! P1 if this is ENGINES or ALL, the engines will build, otherwise not.
$!
@@ -28,80 +28,37 @@ $!
$! P6 if defined, denotes which engines to build. If not defined,
$! 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)
-$! 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).
-$!
-$! P8, if defined, specifies a directory where ZLIB files (zlib.h,
-$! libz.olb) may be found. Optionally, a non-default object library
-$! name may be included ("dev:[dir]libz_64.olb", for example).
-$!
$!-----------------------------------------------------------------------------
$!
-$! Announce/identify.
-$!
-$ proc = f$environment( "procedure")
-$ write sys$output "@@@ "+ -
- f$parse( proc, , , "name")+ f$parse( proc, , , "type")
+$! Set the names of the engines we want to build
$!
-$ on control_c then goto exit
+$ ENGINES = "," + P6
+$ IF ENGINES .EQS. "," THEN -
+ ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec"
$!
$! Set the default TCP/IP library to link against if needed
$!
$ TCPIP_LIB = ""
-$ ZLIB_LIB = ""
-$!
-$! Check What Architecture We Are Using.
-$!
-$ IF (F$GETSYI("CPU").LT.128)
-$ THEN
-$!
-$! The Architecture Is VAX.
-$!
-$ ARCH = "VAX"
-$!
-$! Else...
-$!
-$ ELSE
$!
-$! The Architecture Is Alpha, IA64 or whatever comes in the future.
+$! Set the architecture name
$!
-$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
-$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
+$ ARCH := VAX
+$ IF F$GETSYI("CPU") .GE. 128 THEN ARCH := AXP
$!
-$! End The Architecture Check.
+$! Set the goal directories, and creat them if necessary
$!
-$ ENDIF
-$!
-$ ARCHD = ARCH
-$ LIB32 = "32"
-$ OPT_FILE = ""
-$ POINTER_SIZE = ""
-$!
-$! Set the names of the engines we want to build
-$! NOTE: Some might think this list ugly. However, it's made this way to
-$! reflect the LIBNAMES variable in Makefile as closely as possible,
-$! thereby making it fairly easy to verify that the lists are the same.
-$! NOTE: gmp isn't built, as it's mostly a test engine and brings in another
-$! library that isn't necessarely ported to VMS.
-$!
-$ ENGINES = "," + P6
-$ IF ENGINES .EQS. "," THEN -
- ENGINES = ",4758cca,aep,atalla,cswift,chil,nuron,sureware,ubsec,padlock,"
+$ OBJ_DIR := SYS$DISK:[-.'ARCH'.OBJ.ENGINES]
+$ EXE_DIR := SYS$DISK:[-.'ARCH'.EXE.ENGINES]
+$ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR'
+$ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR'
$!
-$! GOST requires a 64-bit integer type, unavailable on VAX.
+$! Set the goal files, and create them if necessary
$!
-$ IF (ARCH .NES. "VAX") THEN -
- ENGINES = ENGINES+ ",ccgost"
+$ CRYPTO_LIB :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.OLB
+$ CRYPTO_EXE :=SYS$DISK:[-.'ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE
+$ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
$!
-$! Check options.
+$! OK, time to check options and initialise
$!
$ OPT_PHASE = P1
$ ACCEPT_PHASE = "ALL,ENGINES"
@@ -109,51 +66,18 @@ $ OPT_DEBUG = P2
$ OPT_COMPILER = P3
$ OPT_TCPIP_LIB = P4
$ OPT_SPECIAL_THREADS = P5
-$ OPT_POINTER_SIZE = P7
-$ ZLIB = P8
$
$ GOSUB CHECK_OPTIONS
-$!
-$! Set the goal directories, and create them if necessary
-$!
-$ OBJ_DIR := SYS$DISK:[-.'ARCHD'.OBJ.ENGINES]
-$ EXE_DIR := SYS$DISK:[-.'ARCHD'.EXE.ENGINES]
-$ IF F$PARSE(OBJ_DIR) .EQS. "" THEN CREATE/DIRECTORY 'OBJ_DIR'
-$ IF F$PARSE(EXE_DIR) .EQS. "" THEN CREATE/DIRECTORY 'EXE_DIR'
-$!
-$! Set the goal files, and create them if necessary
-$!
-$ CRYPTO_LIB := SYS$DISK:[-.'ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO'LIB32'.OLB
-$ IF F$SEARCH(CRYPTO_LIB) .EQS. "" THEN LIBRARY/CREATE/OBJECT 'CRYPTO_LIB'
-$!
-$! Specify the destination directory in any /MAP option.
-$!
-$ if (LINKMAP .eqs. "MAP")
-$ then
-$ LINKMAP = LINKMAP+ "=''EXE_DIR'"
-$ endif
-$!
-$! Add the location prefix to the linker options file name.
-$!
-$ if (OPT_FILE .nes. "")
-$ then
-$ OPT_FILE = EXE_DIR+ OPT_FILE
-$ endif
-$!
-$! Initialise.
-$!
$ GOSUB INITIALISE
$ GOSUB CHECK_OPT_FILE
$!
-$! Define what goes into each engine. VAX includes a transfer vector.
+$! Define what goes into each engine
$!
$ ENGINE_ = ""
-$ TV_OBJ = ""
$ IF ARCH .EQS. "VAX"
$ THEN
$ ENGINE_ = "engine_vector.mar"
-$ TV_OBJ_NAME = OBJ_DIR + F$PARSE(ENGINE_,,,"NAME","SYNTAX_ONLY") + ".OBJ"
-$ TV_OBJ = ",''TV_OBJ_NAME'"
+$ EXTRA_OBJ := ,'OBJ_DIR'ENGINE_VECTOR.OBJ
$ ENDIF
$ ENGINE_4758CCA = "e_4758cca"
$ ENGINE_aep = "e_aep"
@@ -163,13 +87,6 @@ $ ENGINE_chil = "e_chil"
$ ENGINE_nuron = "e_nuron"
$ ENGINE_sureware = "e_sureware"
$ ENGINE_ubsec = "e_ubsec"
-$ ENGINE_padlock = "e_padlock"
-$
-$ ENGINE_ccgost_SUBDIR = "ccgost"
-$ ENGINE_ccgost = "e_gost_err,gost2001_keyx,gost2001,gost89,gost94_keyx,"+ -
- "gost_ameth,gost_asn1,gost_crypt,gost_ctl,gost_eng,"+ -
- "gosthash,gost_keywrap,gost_md,gost_params,gost_pmeth,"+ -
- "gost_sign"
$!
$! Define which programs need to be linked with a TCP/IP library
$!
@@ -216,13 +133,6 @@ $ ELSE
$ WRITE SYS$OUTPUT "Compiling Support Files. (",BUILDALL,")"
$ ENDIF
$!
-$! Create a .OPT file for the object files (for a real engine name).
-$!
-$ IF ENGINE_NAME .NES. ""
-$ THEN
-$ OPEN /WRITE OBJECTS 'EXE_DIR''ENGINE_NAME'.OPT
-$ ENDIF
-$!
$! Here's the start of per-engine module loop.
$!
$ FILE_COUNTER = 0
@@ -239,12 +149,7 @@ $ IF FILE_NAME .EQS. "" THEN GOTO FILE_NEXT
$!
$! Set up the source and object reference
$!
-$ IF F$TYPE('LIB_ENGINE'_SUBDIR) .EQS. ""
-$ THEN
-$ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[].C",,,"SYNTAX_ONLY")
-$ ELSE
-$ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[."+'LIB_ENGINE'_SUBDIR+"].C",,,"SYNTAX_ONLY")
-$ ENDIF
+$ SOURCE_FILE = F$PARSE(FILE_NAME,"SYS$DISK:[].C",,,"SYNTAX_ONLY")
$ OBJECT_FILE = OBJ_DIR + F$PARSE(FILE_NAME,,,"NAME","SYNTAX_ONLY") + ".OBJ"
$!
$! If we get some problem, we just go on trying to build the next module.
@@ -267,34 +172,13 @@ $!
$! Do the dirty work.
$!
$ ON ERROR THEN GOTO FILE_NEXT
-$ IF F$EDIT(F$PARSE(SOURCE_FILE,,,"TYPE","SYNTAX_ONLY"),"UPCASE") .EQS. ".MAR"
+$ IF FILE_NAME - ".MAR" .NES. FILE_NAME
$ THEN
$ MACRO/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
$ ELSE
$ CC/OBJECT='OBJECT_FILE' 'SOURCE_FILE'
$ ENDIF
$!
-$! Write the entry to the .OPT file (for a real engine name).
-$!
-$ IF ENGINE_NAME .NES. ""
-$ THEN
-$ WRITE OBJECTS OBJECT_FILE
-$ ENDIF
-$!
-$! Next file
-$!
-$ GOTO FILE_NEXT
-$!
-$ FILE_DONE:
-$!
-$! Do not link the support files.
-$!
-$ IF ENGINE_NAME .EQS. "" THEN GOTO ENGINE_NEXT
-$!
-$! Close the linker options file (for a real engine name).
-$!
-$ CLOSE OBJECTS
-$!
$! Now, there are two ways to handle this. We can either build
$! shareable images or stick the engine object file into libcrypto.
$! For now, the latter is NOT supported.
@@ -305,14 +189,28 @@ $! For shareable libraries, we need to do things a little differently
$! depending on if we link with a TCP/IP library or not.
$!
$ ENGINE_OPT := SYS$DISK:[]'ARCH'.OPT
-$ LINK /'DEBUGGER' /'LINKMAP' /'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
- 'EXE_DIR''ENGINE_NAME'.OPT /OPTIONS -
- 'TV_OBJ', -
- 'CRYPTO_LIB' /LIBRARY, -
- 'ENGINE_OPT' /OPTIONS -
- 'TCPIP_LIB' -
- 'ZLIB_LIB' -
- ,'OPT_FILE' /OPTIONS
+$ IF TCPIP_LIB .NES. ""
+$ THEN
+$ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
+ 'OBJECT_FILE''EXTRA_OBJ', -
+ 'CRYPTO_LIB'/LIBRARY, -
+ 'ENGINE_OPT'/OPTION,'TCPIP_LIB','OPT_FILE'/OPTION
+$ ELSE
+$ LINK/'DEBUGGER'/'TRACEBACK' /SHARE='EXE_DIR''ENGINE_NAME'.EXE -
+ 'OBJECT_FILE''EXTRA_OBJ', -
+ 'CRYPTO_LIB'/LIBRARY, -
+ 'ENGINE_OPT'/OPTION,'OPT_FILE'/OPTION
+$ ENDIF
+$!
+$! Clean up
+$!
+$ DELETE 'OBJECT_FILE';*
+$!
+$! Next file
+$!
+$ GOTO FILE_NEXT
+$!
+$ FILE_DONE:
$!
$! Next engine
$!
@@ -346,7 +244,7 @@ $!
$ CREATE 'OPT_FILE'
$DECK
!
-! Default System Options File To Link Against
+! Default System Options File To Link Agianst
! The Sharable VAX C Runtime Library.
!
SYS$SHARE:VAXCRTL.EXE/SHARE
@@ -375,7 +273,7 @@ $!
$ CREATE 'OPT_FILE'
$DECK
!
-! Default System Options File To Link Against
+! Default System Options File To Link Agianst
! The Sharable C Runtime Library.
!
GNU_CC:[000000]GCCLIB/LIBRARY
@@ -400,7 +298,7 @@ $!
$ IF (F$SEARCH(OPT_FILE).EQS."")
$ THEN
$!
-$! Figure Out If We Need A non-VAX Or A VAX Linker Option File.
+$! Figure Out If We Need An AXP Or A VAX Linker Option File.
$!
$ IF ARCH .EQS. "VAX"
$ THEN
@@ -410,7 +308,7 @@ $!
$ CREATE 'OPT_FILE'
$DECK
!
-! Default System Options File To Link Against
+! Default System Options File To Link Agianst
! The Sharable DEC C Runtime Library.
!
SYS$SHARE:DECC$SHR.EXE/SHARE
@@ -420,19 +318,19 @@ $! Else...
$!
$ ELSE
$!
-$! Create The non-VAX Linker Option File.
+$! Create The AXP Linker Option File.
$!
$ CREATE 'OPT_FILE'
$DECK
!
-! Default System Options File For non-VAX To Link Against
+! Default System Options File For AXP To Link Agianst
! The Sharable C Runtime Library.
!
SYS$SHARE:CMA$OPEN_LIB_SHR/SHARE
SYS$SHARE:CMA$OPEN_RTL/SHARE
$EOD
$!
-$! End The DEC C Option File Check.
+$! End The VAX/AXP DEC C Option File Check.
$!
$ ENDIF
$!
@@ -469,13 +367,13 @@ $! Else...
$!
$ ELSE
$!
-$! Else, Check To See If OPT_PHASE Has A Valid Argument.
+$! Else, Check To See If OPT_PHASE Has A Valid Arguement.
$!
$ IF ("," + ACCEPT_PHASE + ",") - ("," + OPT_PHASE + ",") -
.NES. ("," + ACCEPT_PHASE + ",")
$ THEN
$!
-$! A Valid Argument.
+$! A Valid Arguement.
$!
$ BUILDALL = OPT_PHASE
$!
@@ -497,16 +395,15 @@ $ IF ("," + ACCEPT_PHASE + ",") - ",ENGINES," -
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT " where 'xxx' stands for:"
$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT " ALPHA[64]: Alpha architecture."
-$ WRITE SYS$OUTPUT " IA64[64] : IA64 architecture."
-$ WRITE SYS$OUTPUT " VAX : VAX architecture."
+$ WRITE SYS$OUTPUT " AXP : Alpha architecture."
+$ WRITE SYS$OUTPUT " VAX : VAX architecture."
$ WRITE SYS$OUTPUT ""
$!
$! Time To EXIT.
$!
$ EXIT
$!
-$! End The Valid Argument Check.
+$! End The Valid Arguement Check.
$!
$ ENDIF
$!
@@ -519,16 +416,15 @@ $!
$ IF (OPT_DEBUG.EQS."NODEBUG")
$ THEN
$!
-$! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information.
+$! OPT_DEBUG Is NODEBUG, So Compile Without The Debugger Information.
$!
-$ DEBUGGER = "NODEBUG"
-$ LINKMAP = "NOMAP"
-$ TRACEBACK = "NOTRACEBACK"
-$ GCC_OPTIMIZE = "OPTIMIZE"
-$ CC_OPTIMIZE = "OPTIMIZE"
-$ MACRO_OPTIMIZE = "OPTIMIZE"
-$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
-$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
+$ DEBUGGER = "NODEBUG"
+$ TRACEBACK = "NOTRACEBACK"
+$ GCC_OPTIMIZE = "OPTIMIZE"
+$ CC_OPTIMIZE = "OPTIMIZE"
+$ MACRO_OPTIMIZE = "OPTIMIZE"
+$ WRITE SYS$OUTPUT "No Debugger Information Will Be Produced During Compile."
+$ WRITE SYS$OUTPUT "Compiling With Compiler Optimization."
$ ELSE
$!
$! Check To See If We Are To Compile With Debugger Information.
@@ -539,7 +435,6 @@ $!
$! Compile With Debugger Information.
$!
$ DEBUGGER = "DEBUG"
-$ LINKMAP = "MAP"
$ TRACEBACK = "TRACEBACK"
$ GCC_OPTIMIZE = "NOOPTIMIZE"
$ CC_OPTIMIZE = "NOOPTIMIZE"
@@ -548,7 +443,7 @@ $ WRITE SYS$OUTPUT "Debugger Information Will Be Produced During Compile."
$ WRITE SYS$OUTPUT "Compiling Without Compiler Optimization."
$ ELSE
$!
-$! They Entered An Invalid Option.
+$! They Entered An Invalid Option..
$!
$ WRITE SYS$OUTPUT ""
$ WRITE SYS$OUTPUT "The Option ",OPT_DEBUG," Is Invalid. The Valid Options Are:"
@@ -561,7 +456,7 @@ $! Time To EXIT.
$!
$ EXIT
$!
-$! End The Valid Argument Check.
+$! End The Valid Arguement Check.
$!
$ ENDIF
$!
@@ -603,59 +498,6 @@ $! End The OPT_SPECIAL_THREADS Check.
$!
$ ENDIF
$!
-$! Check OPT_POINTER_SIZE (P7).
-$!
-$ IF (OPT_POINTER_SIZE .NES. "") .AND. (ARCH .NES. "VAX")
-$ THEN
-$!
-$ IF (OPT_POINTER_SIZE .EQS. "32")
-$ THEN
-$ POINTER_SIZE = " /POINTER_SIZE=32"
-$ ELSE
-$ POINTER_SIZE = F$EDIT( OPT_POINTER_SIZE, "COLLAPSE, UPCASE")
-$ IF ((POINTER_SIZE .EQS. "64") .OR. -
- (POINTER_SIZE .EQS. "64=") .OR. -
- (POINTER_SIZE .EQS. "64=ARGV"))
-$ THEN
-$ ARCHD = ARCH+ "_64"
-$ LIB32 = ""
-$ POINTER_SIZE = " /POINTER_SIZE=64"
-$ ELSE
-$!
-$! Tell The User Entered An Invalid Option.
-$!
-$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT "The Option ", OPT_POINTER_SIZE, -
- " Is Invalid. The Valid Options Are:"
-$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT -
- " """" : Compile with default (short) pointers."
-$ WRITE SYS$OUTPUT -
- " 32 : Compile with 32-bit (short) pointers."
-$ WRITE SYS$OUTPUT -
- " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
-$ WRITE SYS$OUTPUT -
- " 64= : Compile with 64-bit (long) pointers (no ARGV)."
-$ WRITE SYS$OUTPUT -
- " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
-$ WRITE SYS$OUTPUT ""
-$!
-$! Time To EXIT.
-$!
-$ EXIT
-$!
-$ ENDIF
-$!
-$ ENDIF
-$!
-$! End The OPT_POINTER_SIZE Check.
-$!
-$ ENDIF
-$!
-$! Set basic C compiler /INCLUDE directories.
-$!
-$ CC_INCLUDES = "SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS]"
-$!
$! Check To See If OPT_COMPILER Is Blank.
$!
$ IF (OPT_COMPILER.EQS."")
@@ -679,7 +521,7 @@ $ ELSE
$!
$! Check To See If We Have VAXC Or DECC.
$!
-$ IF (ARCH.NES."VAX").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
+$ IF (ARCH.EQS."AXP").OR.(F$TRNLNM("DECC$CC_DEFAULT").NES."")
$ THEN
$!
$! Looks Like DECC, Set To Use DECC.
@@ -756,63 +598,11 @@ $ CCDEFS = "TCPIP_TYPE_''OPT_TCPIP_LIB',DSO_VMS"
$ 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"
+$ CCDISABLEWARNINGS = "LONGLONGTYPE,LONGLONGSUFX"
$ IF F$TYPE(USER_CCDISABLEWARNINGS) .NES. "" THEN -
CCDISABLEWARNINGS = CCDISABLEWARNINGS + "," + USER_CCDISABLEWARNINGS
$!
-$! Check To See If We Have A ZLIB Option.
-$!
-$ IF (ZLIB .NES. "")
-$ THEN
-$!
-$! Check for expected ZLIB files.
-$!
-$ err = 0
-$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
-$ if (f$search( file1) .eqs. "")
-$ then
-$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
-$ WRITE SYS$OUTPUT " Can't find header: ''file1'"
-$ err = 1
-$ endif
-$ file1 = f$parse( "A.;", ZLIB)- "A.;"
-$!
-$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
-$ if (f$search( file2) .eqs. "")
-$ then
-$ if (err .eq. 0)
-$ then
-$ WRITE SYS$OUTPUT ""
-$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
-$ endif
-$ WRITE SYS$OUTPUT " Can't find library: ''file2'"
-$ WRITE SYS$OUTPUT ""
-$ err = err+ 2
-$ endif
-$ if (err .eq. 1)
-$ then
-$ WRITE SYS$OUTPUT ""
-$ endif
-$!
-$ if (err .ne. 0)
-$ then
-$ EXIT
-$ endif
-$!
-$ CCDEFS = """ZLIB=1"", "+ CCDEFS
-$ CC_INCLUDES = CC_INCLUDES+ ", "+ file1
-$ ZLIB_LIB = ", ''file2' /library"
-$!
-$! Print info
-$!
-$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
-$!
-$! End The ZLIB Check.
-$!
-$ ENDIF
-$!
-$! Check To See If The User Entered A Valid Parameter.
+$! Check To See If The User Entered A Valid Paramter.
$!
$ IF (OPT_COMPILER.EQS."VAXC").OR.(OPT_COMPILER.EQS."DECC").OR.(OPT_COMPILER.EQS."GNUC")
$ THEN
@@ -835,14 +625,14 @@ $!
$ 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"+ -
- "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
- " /INCLUDE=(''CC_INCLUDES') " + -
- CCEXTRAFLAGS
+$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/STANDARD=ANSI89" + -
+ "/NOLIST/PREFIX=ALL" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[.VENDOR_DEFNS])" + -
+ CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "VAX_DECC_OPTIONS.OPT"
+$ OPT_FILE = "SYS$DISK:[]VAX_DECC_OPTIONS.OPT"
$!
$! End DECC Check.
$!
@@ -864,14 +654,14 @@ $!
$! Compile Using VAXC.
$!
$ CC = "CC"
-$ IF ARCH.NES."VAX"
+$ IF ARCH.EQS."AXP"
$ THEN
$ WRITE SYS$OUTPUT "There is no VAX C on Alpha!"
$ EXIT
$ ENDIF
$ IF F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC" THEN CC = "CC/VAXC"
$ CC = CC + "/''CC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
- "/INCLUDE=(''CC_INCLUDES')" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
CCEXTRAFLAGS
$ CCDEFS = """VAXC""," + CCDEFS
$!
@@ -881,7 +671,7 @@ $ DEFINE/NOLOG SYS SYS$COMMON:[SYSLIB]
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "VAX_VAXC_OPTIONS.OPT"
+$ OPT_FILE = "SYS$DISK:[]VAX_VAXC_OPTIONS.OPT"
$!
$! End VAXC Check
$!
@@ -903,12 +693,12 @@ $!
$! Use GNU C...
$!
$ CC = "GCC/NOCASE_HACK/''GCC_OPTIMIZE'/''DEBUGGER'/NOLIST" + -
- "/INCLUDE=(''CC_INCLUDES')" + -
+ "/INCLUDE=(SYS$DISK:[],SYS$DISK:[-],SYS$DISK:[.ENGINE.VENDOR_DEFNS])" + -
CCEXTRAFLAGS
$!
$! Define The Linker Options File Name.
$!
-$ OPT_FILE = "VAX_GNUC_OPTIONS.OPT"
+$ OPT_FILE = "SYS$DISK:[]VAX_GNUC_OPTIONS.OPT"
$!
$! End The GNU C Check.
$!
@@ -924,18 +714,18 @@ $ IF COMPILER .EQS. "DECC"
$ 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
$!
$ WRITE/SYMBOL SYS$OUTPUT "Main C Compiling Command: ",CC
$!
-$! Else The User Entered An Invalid Argument.
+$! Else The User Entered An Invalid Arguement.
$!
$ ELSE
$!
@@ -953,18 +743,14 @@ $! Time To EXIT.
$!
$ EXIT
$!
-$! End The Valid Argument Check.
+$! End The Valid Arguement Check.
$!
$ ENDIF
$!
$! Build a MACRO command for the architecture at hand
$!
-$ IF ARCH .EQS. "VAX"
-$ THEN
-$ MACRO = "MACRO/''DEBUGGER'"
-$ ELSE
-$ MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
-$ ENDIF
+$ IF ARCH .EQS. "VAX" THEN MACRO = "MACRO/''DEBUGGER'"
+$ IF ARCH .EQS. "AXP" THEN MACRO = "MACRO/MIGRATION/''DEBUGGER'/''MACRO_OPTIMIZE'"
$!
$! Show user the result
$!
@@ -984,7 +770,7 @@ $ THEN
$!
$! Set the library to use SOCKETSHR
$!
-$ TCPIP_LIB = ",SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
+$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT/OPT"
$!
$! Done with SOCKETSHR
$!
@@ -1010,13 +796,13 @@ $ THEN
$!
$! Set the library to use UCX.
$!
-$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
+$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT/OPT"
$ IF F$TRNLNM("UCX$IPC_SHR") .NES. ""
$ THEN
-$ TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT /OPTIONS"
+$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC_LOG.OPT/OPT"
$ ELSE
$ IF COMPILER .NES. "DECC" .AND. ARCH .EQS. "VAX" THEN -
- TCPIP_LIB = ",SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT /OPTIONS"
+ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_VAXC.OPT/OPT"
$ ENDIF
$!
$! Done with UCX
@@ -1030,7 +816,7 @@ $ THEN
$!
$! Set the library to use TCPIP (post UCX).
$!
-$ TCPIP_LIB = ",SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
+$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT/OPT"
$!
$! Done with TCPIP
$!
@@ -1051,9 +837,9 @@ $ ENDIF
$!
$! Print info
$!
-$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB- ","
+$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
$!
-$! Else The User Entered An Invalid Argument.
+$! Else The User Entered An Invalid Arguement.
$!
$ ELSE
$!
@@ -1094,7 +880,7 @@ $ __INCLUDE = __TOP + "INCLUDE.OPENSSL]"
$!
$! Set up the logical name OPENSSL to point at the include directory
$!
-$ DEFINE OPENSSL /NOLOG '__INCLUDE'
+$ DEFINE OPENSSL/NOLOG '__INCLUDE'
$!
$! Done
$!
@@ -1102,24 +888,15 @@ $ RETURN
$!
$ CLEANUP:
$!
-$! Restore the saved logical name OPENSSL, if it had a value.
+$! Restore the logical name OPENSSL if it had a value
$!
-$ if (f$type( __SAVE_OPENSSL) .nes. "")
-$ then
-$ IF __SAVE_OPENSSL .EQS. ""
-$ THEN
-$ DEASSIGN OPENSSL
-$ ELSE
-$ DEFINE /NOLOG OPENSSL '__SAVE_OPENSSL'
-$ ENDIF
-$ endif
-$!
-$! Close any open files.
-$!
-$ if (f$trnlnm( "objects", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
- close objects
+$ IF __SAVE_OPENSSL .EQS. ""
+$ THEN
+$ DEASSIGN OPENSSL
+$ ELSE
+$ DEFINE/NOLOG OPENSSL '__SAVE_OPENSSL'
+$ ENDIF
$!
$! Done
$!
$ RETURN
-$!
diff --git a/lib/libssl/src/ms/do_win64a.bat b/lib/libssl/src/ms/do_win64a.bat
index ff8b19ccfd2..825c6902215 100755
--- a/lib/libssl/src/ms/do_win64a.bat
+++ b/lib/libssl/src/ms/do_win64a.bat
@@ -1,19 +1,9 @@
-perl util\mkfiles.pl >MINFO
-
-cmd /c "nasm -f win64 -v" >NUL: 2>&1
-if %errorlevel% neq 0 goto ml64
-
-perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
-nasm -f win64 -o ms\uptable.obj ms\uptable.asm
-goto proceed
-
-:ml64
-perl ms\uplink-x86_64.pl masm > ms\uptable.asm
-ml64 -c -Foms\uptable.obj ms\uptable.asm
-
-:proceed
-perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
-perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
-
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+
+perl util\mkfiles.pl >MINFO
+perl ms\uplink.pl win64a > ms\uptable.asm
+ml64 -c -Foms\uptable.obj ms\uptable.asm
+perl util\mk1mf.pl no-asm VC-WIN64A >ms\nt.mak
+perl util\mk1mf.pl dll no-asm VC-WIN64A >ms\ntdll.mak
+
+perl util\mkdef.pl 32 libeay > ms\libeay32.def
+perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
diff --git a/lib/libssl/src/ms/do_win64i.bat b/lib/libssl/src/ms/do_win64i.bat
index 088f5e1d0a8..7bfc2f18188 100755
--- a/lib/libssl/src/ms/do_win64i.bat
+++ b/lib/libssl/src/ms/do_win64i.bat
@@ -1,9 +1,9 @@
-
-perl util\mkfiles.pl >MINFO
-perl ms\uplink-ia64.pl > ms\uptable.asm
-ias -o ms\uptable.obj ms\uptable.asm
-perl util\mk1mf.pl VC-WIN64I >ms\nt.mak
-perl util\mk1mf.pl dll VC-WIN64I >ms\ntdll.mak
-
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+
+perl util\mkfiles.pl >MINFO
+perl ms\uplink.pl win64i > ms\uptable.asm
+ias -o ms\uptable.obj ms\uptable.asm
+perl util\mk1mf.pl no-asm VC-WIN64I >ms\nt.mak
+perl util\mk1mf.pl dll no-asm VC-WIN64I >ms\ntdll.mak
+
+perl util\mkdef.pl 32 libeay > ms\libeay32.def
+perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
diff --git a/lib/libssl/src/ms/uplink.c b/lib/libssl/src/ms/uplink.c
index 6d59cb1f87c..7b7da08d47b 100644
--- a/lib/libssl/src/ms/uplink.c
+++ b/lib/libssl/src/ms/uplink.c
@@ -40,8 +40,7 @@ void OPENSSL_Uplink (volatile void **table, int index)
* should be sufficient [it prohibits compiler to reorder memory
* access instructions]. */
do {
- len = _sntprintf (msg,sizeof(msg)/sizeof(TCHAR),
- _T("OPENSSL_Uplink(%p,%02X): "),table,index);
+ len = _stprintf (msg,_T("OPENSSL_Uplink(%p,%02X): "),table,index);
_tcscpy (msg+len,_T("unimplemented function"));
if ((h=apphandle)==NULL)
diff --git a/lib/libssl/src/ms/uplink.h b/lib/libssl/src/ms/uplink.h
index 4881ba7d429..a4a67d3c146 100644
--- a/lib/libssl/src/ms/uplink.h
+++ b/lib/libssl/src/ms/uplink.h
@@ -23,7 +23,7 @@ extern void *OPENSSL_UplinkTable[];
#define UP_fileno (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FILENO])
#define UP_open (*(int (*)(const char *,int,...))OPENSSL_UplinkTable[APPLINK_OPEN])
-#define UP_read (*(ossl_ssize_t (*)(int,void *,size_t))OPENSSL_UplinkTable[APPLINK_READ])
-#define UP_write (*(ossl_ssize_t (*)(int,const void *,size_t))OPENSSL_UplinkTable[APPLINK_WRITE])
+#define UP_read (*(ssize_t (*)(int,void *,size_t))OPENSSL_UplinkTable[APPLINK_READ])
+#define UP_write (*(ssize_t (*)(int,const void *,size_t))OPENSSL_UplinkTable[APPLINK_WRITE])
#define UP_lseek (*(long (*)(int,long,int))OPENSSL_UplinkTable[APPLINK_LSEEK])
#define UP_close (*(int (*)(int))OPENSSL_UplinkTable[APPLINK_CLOSE])