Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 17 Aug 2004 19:13:38 +0200
From: "Gerrit P. Haase" <gerrit@familiehaase.de>
Reply-To: "Gerrit P. Haase" <gerrit@familiehaase.de>
Organization: Esse keine toten Tiere
Message-ID: <201153887051.20040817191338@familiehaase.de>
To: "Gerrit P. Haase" <freeweb@nyckelpiga.de>
CC: cygwin@cygwin.com
Subject: Re: compile error with mysql 4.1.2-alpha
In-Reply-To: <117-761725043.20040614115304@familiehaase.de>
References: <40C5E670.1040708@ekers.idps.co.uk> <40C825F7.7050107@ekers.idps.co.uk> <117-761725043.20040614115304@familiehaase.de>
MIME-Version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
X-IsSubscribed: yes

Gerrit schrieb:

> cygwin wrote:


>> I downloaded mysql 4.0.20 source (not the win version). It fails to 
>> compile with the following error:

>> =========================================================================
>> if gcc -DDEFAULT_BASEDIR=\"/usr/local\" -DDATADIR="\"/usr/local/var\""
>> -DDEFAULT_CHARSET_HOME="\"/usr/local\"" 
>> -DSHAREDIR="\"/usr/local/share/mysql\""
>>   -DHAVE_CONFIG_H -I. -I. -I.. -I./../include -I../include -I.. -I. 
>> -O3 -DDBUG_OFF   -MT my_thr_init.o -MD -MP -MF ".deps/my_thr_init.Tpo" \
>>    -c -o my_thr_init.o `test -f 'my_thr_init.c' || echo 
>> './'`my_thr_init.c; \
>> then mv -f ".deps/my_thr_init.Tpo" ".deps/my_thr_init.Po"; \
>> else rm -f ".deps/my_thr_init.Tpo"; exit 1; \
>> fi
>> my_thr_init.c: In function `my_thread_global_init':
>> my_thr_init.c:72: error: `PTHREAD_MUTEX_ERRORCHECK_NP' undeclared (first
>> use in this function)
>> my_thr_init.c:72: error: (Each undeclared identifier is reported only once
>> my_thr_init.c:72: error: for each function it appears in.)
>> make[2]: *** [my_thr_init.o] Error 1
>> make[2]: Leaving directory `/c/Documents and Settings/jeremy/My 
>> Documents/My Downloads/tmp/mysql-4.0.20/mysys'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/c/Documents and Settings/jeremy/My 
>> Documents/My Downloads/tmp/mysql-4.0.20'
>> make: *** [all] Error 2
>> =========================================================================

>> What is going on here? I can find PTHREAD_MUTEX_ERRORCHECK_NP in the 
>> linux pthread.h, but not cygwin.


> I have a fix for this at my home box, I'll try to find it and post it.


For the archives:

diff -urdN mysql-4.0.17~/include/my_pthread.h mysql-4.0.17/include/my_pthread.h
--- mysql-4.0.17~/include/my_pthread.h  2003-12-14 22:23:47.000000000 +0100
+++ mysql-4.0.17/include/my_pthread.h   2004-05-28 22:34:32.206907200 +0200
@@ -607,6 +607,17 @@
 #define MY_INIT_MUTEX_ERRCHK &my_errchk_mutexattr
 #endif
 
+/*
+ * Mutex types.
+ */
+#ifdef __CYGWIN__
+#define        PTHREAD_MUTEX_FAST_NP                   PTHREAD_MUTEX_NORMAL
+#define        PTHREAD_MUTEX_RECURSIVE_NP              PTHREAD_MUTEX_RECURSIVE
+#define        PTHREAD_MUTEX_ERRORCHECK_NP             PTHREAD_MUTEX_ERRORCHECK
+#define        PTHREAD_MUTEX_TIMED_NP                  PTHREAD_MUTEX_NORMAL
+#define        PTHREAD_MUTEX_ADAPTIVE_NP               PTHREAD_MUTEX_NORMAL
+#endif /* __CYGWIN__ */
+
 extern my_bool my_thread_global_init(void);
 extern void my_thread_global_end(void);
 extern my_bool my_thread_init(void);


Gerrit

-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

