Skip to content

Commit

Permalink
Incorporate some changes that make OpenSSL compilable in CygWin.
Browse files Browse the repository at this point in the history
  • Loading branch information
levitte committed Apr 4, 2001
1 parent 26c7750 commit 967d95f
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

Changes between 0.9.6 and 0.9.7 [xx XXX 2000]

*) Change Configure and Makefiles to provide EXE_EXT, which will contain
the default extension for executables, if any. Also, make the perl
scripts that use symlink() to test if it really exists and use "cp"
if it doesn't. All this made OpenSSL compilable and installable in
CygWin.
[Richard Levitte]

*) Rewrite CHOICE field setting in ASN1_item_ex_d2i(). The old code
could not support the combine flag in choice fields.
[Steve Henson]
Expand Down
3 changes: 3 additions & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32

my $prefix="";
my $openssldir="";
my $exe_ext="";
my $install_prefix="";
my $no_threads=0;
my $no_shared=1;
Expand Down Expand Up @@ -681,6 +682,7 @@ print "Configuring for $target\n";

my $IsWindows=scalar grep /^$target$/,@WinTargets;

$exe_ext=".exe" if ($target eq "CygWin32");
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
$prefix=$openssldir if $prefix eq "";

Expand Down Expand Up @@ -923,6 +925,7 @@ while (<IN>)
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG= $depflags/;
s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
s/^EXE_EXT=.*$/EXE_EXT= $exe_ext/;
s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
s/^DES_ENC=.*$/DES_ENC= $des_obj/;
s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
Expand Down
7 changes: 4 additions & 3 deletions Makefile.org
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD
DEPFLAG=
PEX_LIBS=
EX_LIBS=
EXE_EXT=
AR=ar r
RANLIB= ranlib
PERL= perl
Expand Down Expand Up @@ -209,7 +210,7 @@ sub_all:
do \
if [ -d "$$i" ]; then \
(cd $$i && echo "making all in $$i..." && \
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' all ) || exit 1; \
$(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' all ) || exit 1; \
else \
$(MAKE) $$i; \
fi; \
Expand Down Expand Up @@ -403,7 +404,7 @@ test: tests

tests: rehash
@(cd test && echo "testing..." && \
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' OPENSSL_DEBUG_MEMORY=on tests );
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' TESTS='${TESTS}' KRB5_INCLUDES='${KRB5_INCLUDES}' LIBKRB5='${LIBKRB5}' EXE_EXT='${EXE_EXT}' OPENSSL_DEBUG_MEMORY=on tests );
@apps/openssl version -a

report:
Expand Down Expand Up @@ -502,7 +503,7 @@ install: all install_docs
do \
if [ -d "$$i" ]; then \
(cd $$i; echo "installing $$i..."; \
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' install ); \
$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' install ); \
fi; \
done
@for i in $(LIBS) ;\
Expand Down
5 changes: 3 additions & 2 deletions apps/Makefile.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ LIBKRB5=

PEX_LIBS=
EX_LIBS=
EXE_EXT=

CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)

Expand All @@ -36,7 +37,7 @@ PROGRAM= openssl

SCRIPTS=CA.sh CA.pl der_chop

EXE= $(PROGRAM)
EXE= $(PROGRAM)$(EXE_EXT)

E_EXE= verify asn1pars req dgst dh dhparam enc passwd gendh errstr \
ca crl rsa rsautl dsa dsaparam \
Expand Down Expand Up @@ -81,7 +82,7 @@ top:

all: exe

exe: $(EXE)
exe: $(PROGRAM)

req: sreq.o $(A_OBJ) $(DLIBCRYPTO)
$(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(RAND_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
Expand Down
14 changes: 12 additions & 2 deletions tools/c_rehash.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ sub link_hash_cert {
}
$hash .= ".$suffix";
print "$fname => $hash\n";
symlink $fname, $hash;
$symlink_exists=eval {symlink("",""); 1};
if ($symlink_exists) {
symlink $fname, $hash;
} else {
system ("cp", $fname, $hash);
}
$hashlist{$hash} = $fprint;
}

Expand All @@ -142,7 +147,12 @@ sub link_hash_crl {
}
$hash .= ".r$suffix";
print "$fname => $hash\n";
symlink $fname, $hash;
$symlink_exists=eval {symlink("",""); 1};
if ($symlink_exists) {
symlink $fname, $hash;
} else {
system ("cp", $fname, $hash);
}
$hashlist{$hash} = $fprint;
}

7 changes: 6 additions & 1 deletion util/mklink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@
my $to = join('/', @to_path);

my $file;
$symlink_exists=eval {symlink("",""); 1};
foreach $file (@files) {
my $err = "";
symlink("$to/$file", "$from/$file") or $err = " [$!]";
if ($symlink_exists) {
symlink("$to/$file", "$from/$file") or $err = " [$!]";
} else {
system ("cp", "$file", "$from/$file") and $err = " [$!]";
}
print $file . " => $from/$file$err\n";
}

0 comments on commit 967d95f

Please sign in to comment.