List:Internals« Previous MessageNext Message »
From:Timothy Smith Date:April 14 2001 3:20pm
Subject:Re: Patch to help compilations under Cygwin
View as plain text  
On 2001 Apr 12, Pete French <pfrench@stripped> wrote:
> I was advised that this is the correct address to send patches to
> that may be of use in the relased source to mySQL.
> 
> One of my biggest problems with mySQL is the fact that it does not
> compile "out of the box" on Cygwin. This is mainly due to the fact
> that configure identifies the system as "windows" and then assumed
> a windows API and includes appropiate header files.

Peter, thanks for the patch.  I've changed it quite a bit.
Here's what I've applied.  Please try the next MySQL release and
let me know if it works for you.  If you're up to it, you could
try building the server as well, to see what happens.

===== include/global.h 1.37 vs edited =====
--- 1.37/include/global.h       Wed Feb  7 21:43:54 2001
+++ edited/include/global.h     Sat Apr 14 11:05:33 2001
@@ -28,6 +28,17 @@
 #include <os2.h>
 #endif /* __EMX__ */
 
+#ifdef __CYGWIN__
+/* We use a Unix API, so pretend it's not Windows */
+#undef _WIN32
+#undef _WIN64
+#undef __WIN32__
+#undef WIN32
+#undef __WIN__
+#define HAVE_ERRNO_AS_DEFINE
+#endif /* __CYGWIN__ */
+
+
 #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
 #include <config-win.h>
 #else
===== configure.in 1.126 vs edited =====
--- 1.126/configure.in  Fri Apr 13 15:09:33 2001
+++ edited/configure.in Sat Apr 14 11:09:30 2001
@@ -359,6 +359,9 @@
     *darwin*)
       FIND_PROC="$PS -uaxww | grep mysqld | grep \" \$\$PID \" > /dev/null"
       ;;
+    *cygwin*)
+      FIND_PROC="$PS -e | grep mysqld | grep \" \$\$PID \" > /dev/null"
+      ;;
     *)
       AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the
Installation chapter in the Reference Manual.])
   esac

Tim

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Tim Smith <tim@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Development Team
/_/  /_/\_, /___/\___\_\___/   Boone, NC  USA
       <___/   www.mysql.com
Thread
Patch to help compilations under CygwinPete French12 Apr
  • Re: Patch to help compilations under CygwinTimothy Smith14 Apr
    • Re: Patch to help compilations under CygwinPete French14 Apr
      • Re: Patch to help compilations under CygwinMichael Widenius15 Apr
      • Re: Patch to help compilations under CygwinTimothy Smith16 Apr
    • Re: Patch to help compilations under CygwinSinisa Milivojevic17 Apr
    • Re: Patch to help compilations under CygwinPete French20 Apr
      • Re: Patch to help compilations under CygwinMichael Widenius21 Apr