Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv23832/src/mail
Modified Files:
SendMessageCC.cpp
Log Message:
use the new wxGetProcessId() instead of writing ifdefs in our code
Index: SendMessageCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/SendMessageCC.cpp,v
retrieving revision 1.192
retrieving revision 1.193
diff -b -u -2 -r1.192 -r1.193
--- SendMessageCC.cpp 12 Jun 2002 22:14:30 -0000 1.192
+++ SendMessageCC.cpp 15 Jun 2002 11:42:27 -0000 1.193
@@ -52,15 +52,9 @@
#include "gui/wxIconManager.h"
-#include <wx/utils.h> // wxGetFullHostName()
+#include <wx/utils.h> // wxGetFullHostName(), wxGetProcessId()
#include <wx/file.h>
#include <wx/fontmap.h> // for GetEncodingName()
#include <wx/datetime.h>
-#ifdef OS_WIN
- #include <wx/msw/private.h> // for GetCurrentProcessId()
-#elif defined(OS_UNIX)
- #include <unistd.h> // for getpid()
-#endif
-
extern bool InitSSL(); // from src/util/ssl.cpp
@@ -988,16 +982,10 @@
String BuildMessageId(const char *hostname)
{
- // get the PID from OS (TODO: should have a wxWin function for this)
+ // get the PID from OS only once as it doesn't change while we run
static unsigned long s_pid = 0;
if ( !s_pid )
{
-#ifdef OS_WIN
- s_pid = (unsigned long)GetCurrentProcessId();
-#elif defined(OS_UNIX)
- s_pid = (unsigned long)getpid();
-#else
- #error "Don't know how to getpid() on this platform"
-#endif
+ s_pid = wxGetProcessId();
}
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates