Hi, I am trying to build YahooPOPs for Linux http://sourceforge.net/projects/yahoopops
on Cygwin but have run into a problem with pthreads. The lines below do not compile even though Cygwin supports pthreads and pthread.h is included in the header file. lock.__m_reserved = 0; lock.__m_count = 0; lock.__m_owner = 0; lock.__m_kind = PTHREAD_MUTEX_TIMED_NP; lock.__m_lock.__status = 0; lock.__m_lock.__spinlock = __LT_SPINLOCK_INIT; Does anyone know why these pthread commands(?) are not supported or won't compile? Thanks in advance for the help! Andrew Lynch PS, I am also helping the author of SaveMyModem debug that software. It now builds under Cygwin and many of the bugs have been found and fixed. Give it a try, (cvs version only). Hopefully, version 0.14 will be out soon and much improved. http://sourceforge.net/projects/savemymodem __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com
LogFile.cpp
Description: LogFile.cpp
/************************************************************************* * * YahooPOPs! * * YahooPOPs! is an application that provides POP3 access to Yahoo! Mail. * You do not need to enable POP3 access with Yahoo! to use this program. * This program works within the license agreement of Yahoo! to provide * you with POP3 access. * * YahooPOPs! emulates a POP3 mail server and should work with most of the * email clients. Since YahooPOPs! is not a full-fledged POP3 mail server * you might find it not working with all mail clients. Do keep us informed * about such mail clients so that we can enhance YahooPOPs! * * Official Website: http://yahoopops.sourceforge.net * * Credits: * - YahooPOPs! has been inspired by FetchYahoo, a Perl based application * that works with mail clients supporting mbox'es (Netscape, Pine, etc.). * FetchYahoo is authored by Ravi Ramkissoon <[EMAIL PROTECTED]> *------------------------------------------------------------------------- * * Name : LogFile.h * * Purpose : To maintain an activity log file * * Author : Anuj Seth <[EMAIL PROTECTED]> * K.Shyam <[EMAIL PROTECTED]> * * License : GNU Public License (Version 2 or later) * *------------------------------------------------------------------------- * * THIS SOFTWARE IS PROVIDED ``AS IS'' BY THE AUTHORS AND INDEPENDENT * CONTRIBUTORS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************/ #ifndef _LOGFILE_H_ #define _LOGFILE_H_ #ifdef WIN32 #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 /* added by K.Shyam.we shall use Mstring on *ix systems */ #include "StdString.h" #else #include <iostream.h> #include <stdio.h> #include <pthread.h> /* for the locks */ #include "MString.h" #include "Defines.h" typedef MString CStdString; #endif typedef enum { LOG_BASIC, LOG_ADVANCED } LOGTYPE; class LogFile { public: void Write(const LOGTYPE type, const char *format, ...); LogFile(const CStdString &filename = "yahoopops.log"); virtual ~LogFile(); protected: void Trim(); CStdString m_strLogFile; long m_nFileSize; FILE *fp; #ifdef WIN32 CCriticalSection lock; #else pthread_mutex_t lock; #endif }; #endif
cd ../common;make;cd ../unix make[1]: Entering directory `/home/andrew/yahoopops/yahoopops.sav/common' rm -f LogFile.o g++ -g -I. -I../unix -D_REENTRANT -c LogFile.cpp LogFile.cpp: In method `LogFile::LogFile(const MString & = "yahoopops.log")': LogFile.cpp:87: request for member `__m_reserved' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:88: request for member `__m_count' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:89: request for member `__m_owner' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:90: request for member `__m_kind' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:90: `PTHREAD_MUTEX_TIMED_NP' undeclared (first use this function) LogFile.cpp:90: (Each undeclared identifier is reported only once LogFile.cpp:90: for each function it appears in.) LogFile.cpp:91: request for member `__m_lock' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:92: request for member `__m_lock' in `LogFile::lock', which is of non-aggregate type `void *' LogFile.cpp:92: `__LT_SPINLOCK_INIT' undeclared (first use this function) make[1]: *** [LogFile.o] Error 1 make[1]: Leaving directory `/home/andrew/yahoopops/yahoopops.sav/common' cd ../common/HttpClient;make;cd ../../unix make[1]: Entering directory `/home/andrew/yahoopops/yahoopops.sav/common/HttpClient' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/andrew/yahoopops/yahoopops.sav/common/HttpClient' cd ../common/lib/re_lib;make;cd ../../../unix make[1]: Entering directory `/home/andrew/yahoopops/yahoopops.sav/common/lib/re_lib' ar q libre_lib.a regexp.o regsub.o regerror.o relib_enhance.o ../../vsscanf.o make[1]: Leaving directory `/home/andrew/yahoopops/yahoopops.sav/common/lib/re_lib'
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/