Hi,

the below patch adds support for the new 64 bit version of Cygwin,
running on x86_64.  Only a few minor Configure and Makefile patches are
required to get it run.

The patch is against git from today.  I hope it's ok to apply this to the
upstream sources.


Thanks,
Corinna


 Configure               |  1 +
 Makefile.org            | 22 ++++++++++++----------
 engines/Makefile        | 11 ++++++-----
 engines/ccgost/Makefile | 12 +++++++-----
 4 files changed, 26 insertions(+), 20 deletions(-)

  * Configure: Add Cygwin-x86_64 target.
  * Makefile.org: Match against "Cygwin*" to include different
  Cygwin targets.
  * engines/Makefile: Ditto.
  * engines/ccgost/Makefile: Ditto.

diff --git a/Configure b/Configure
index 45ae45c..133de4e 100755
--- a/Configure
+++ b/Configure
@@ -562,6 +562,7 @@ my %table=(
 "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 
-Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${no_asm}:win32",
 "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
 "debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG 
-DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g 
-Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations 
-Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
+"Cygwin-x86_64", "gcc:-DTERMIOS -DL_ENDIAN -O3 
-Wall:::CYGWIN32::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT 
DES_UNROLL:${x86_64_asm}:mingw64:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
 
 # NetWare from David Ward ([email protected])
 # requires either MetroWerks NLM development tools, or gcc / nlmconv
diff --git a/Makefile.org b/Makefile.org
index 428cbbb..c1635f5 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -418,9 +418,9 @@ clean-shared:
                        done; \
                fi; \
                ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
-               if [ "$(PLATFORM)" = "Cygwin" ]; then \
+               case "$(PLATFORM)" in Cygwin*)  \
                        ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a 
); \
-               fi; \
+               esac; \
        done
 
 link-shared:
@@ -666,11 +666,8 @@ install_sw:
                do \
                        if [ -f "$$i" -o -f "$$i.a" ]; then \
                        (       echo installing $$i; \
-                               if [ "$(PLATFORM)" != "Cygwin" ]; then \
-                                       cp $$i 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
-                                       chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
-                                       mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
-                               else \
+                               case "$(PLATFORM)" in \
+                               Cygwin*) \
                                        c=`echo $$i | sed 
's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
                                        cp $$c 
$(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
                                        chmod 755 
$(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
@@ -678,7 +675,12 @@ install_sw:
                                        cp $$i 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
                                        chmod 644 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
                                        mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
-                               fi ); \
+                                       ;; \
+                               *) \
+                                       cp $$i 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+                                       chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+                                       mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
+                               esac ); \
                                if expr $(PLATFORM) : 'mingw' > /dev/null; then 
\
                                (       case $$i in \
                                                *crypto*) i=libeay32.dll;; \
@@ -738,9 +740,9 @@ install_docs:
        @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
        here="`pwd`"; \
        filecase=; \
-       if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o 
"$(PLATFORM)" = "mingw" ]; then \
+       case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
                filecase=-i; \
-       fi; \
+       esac; \
        set -e; for i in doc/apps/*.pod; do \
                fn=`basename $$i .pod`; \
                sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
diff --git a/engines/Makefile b/engines/Makefile
index 786716c..bba67ab 100644
--- a/engines/Makefile
+++ b/engines/Makefile
@@ -120,7 +120,11 @@ install:
                for l in $(LIBNAMES); do \
                        ( echo installing $$l; \
                          pfx=lib; \
-                         if [ "$(PLATFORM)" != "Cygwin" ]; then \
+                         case "$(PLATFORM)" in \
+                         Cygwin*) \
+                               sfx=".so"; \
+                               cp cyg$$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+                         *) \
                                case "$(CFLAGS)" in \
                                *DSO_BEOS*)     sfx=".so";;     \
                                *DSO_DLFCN*)    sfx=`expr "$(SHLIB_EXT)" : 
'.*\(\.[a-z][a-z]*\)' \| ".so"`;;    \
@@ -129,10 +133,7 @@ install:
                                *)              sfx=".bad";;    \
                                esac; \
                                cp $$pfx$$l$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         else \
-                               sfx=".so"; \
-                               cp cyg$$l.dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
-                         fi; \
+                         esac; \
                          chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
                          mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
                done; \
diff --git a/engines/ccgost/Makefile b/engines/ccgost/Makefile
index c420237..63000de 100644
--- a/engines/ccgost/Makefile
+++ b/engines/ccgost/Makefile
@@ -47,7 +47,12 @@ install:
                set -e; \
                echo installing $(LIBNAME); \
                pfx=lib; \
-               if [ "$(PLATFORM)" != "Cygwin" ]; then \
+               case "$(PLATFORM)" in \
+               Cygwin*) \
+                       sfx=".so"; \
+                       cp cyg$(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+                       ;; \
+               *) \
                        case "$(CFLAGS)" in \
                        *DSO_BEOS*) sfx=".so";; \
                        *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : 
'.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
@@ -56,10 +61,7 @@ install:
                        *) sfx=".bad";; \
                        esac; \
                        cp $${pfx}$(LIBNAME)$$sfx 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-               else \
-                       sfx=".so"; \
-                       cp cyg$(LIBNAME).dll 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
-               fi; \
+               esac; \
                chmod 555 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
                mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
        fi


-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgphDq4KS1uiD.pgp
Description: PGP signature

Reply via email to