Doc updates (debug stuff); Cygwin corrections

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-21 15:40:35 +00:00
parent 25331334d4
commit 6b037754f5
18 changed files with 168 additions and 145 deletions

View File

@@ -55,12 +55,6 @@
#ifdef __GNUWIN32__
#include <sys/unistd.h>
// #include <sys/stat.h>
#ifndef __MINGW32__
#include <std.h>
#endif
#define stricmp strcasecmp
#endif
@@ -214,11 +208,18 @@ wxString wxPathList::FindAbsoluteValidPath (const wxString& file)
bool
wxFileExists (const wxString& filename)
{
#ifdef __GNUWIN32__ // (fix a B20 bug)
if (GetFileAttributes(filename) == 0xFFFFFFFF)
return FALSE;
else
return TRUE;
#else
struct stat stbuf;
if (filename && stat ((char *)(const char *)filename, &stbuf) == 0)
return TRUE;
return FALSE;
#endif
}
/* Vadim's alternative implementation

View File

@@ -39,8 +39,8 @@ MAKE=make
LEX=flex.exe -t -L
# YACC. byacc or bison
YACC=byacc.exe
# YACC=bison.exe
# YACC=byacc.exe
YACC=bison.exe
# Resource compiler
RESCOMP=windres.exe
@@ -57,15 +57,6 @@ OPTIONS= # -D__MINGW32__ # -D__EGCS__
# IRIX: -g3
DEBUGFLAGS = -ggdb -D__WXDEBUG__
# Debug/trace mode. 1 or more for memory debugging.
# Unfortunately this doesn't seem to work with GnuWin32 - get warning:
# ../../include/wx/memory.h:58: warning: declaration of `operator delete(void *)'
# throws different exceptions
# <internal>:58: warning: previous declaration here
# So setting to 0 for now.
WXDEBUG=0
WIN95=1
ifeq ($(WIN95),0)
@@ -143,8 +134,8 @@ LDLIBS = $(LIBS)
OBJDIR = objects$(GUISUFFIX)
# You shouldn't need to change these...
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DWXDEBUG='$(WXDEBUG)' $(WARN) $(OPT)
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib
.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c

View File

@@ -51,7 +51,21 @@
#endif
#ifdef __SVR4__
#include <sys/systeminfo.h>
#endif
#ifdef __SOLARIS__
// somehow missing from sys/wait.h but in the system's docs
extern "C"
{
pid_t wait4(pid_t pid, int *statusp, int options, struct rusage
*rusage);
}
#endif
#include <sys/time.h>
#include <errno.h>
#include <Xm/Xm.h>
@@ -82,7 +96,7 @@ void xt_notify_end_process(XtPointer client, int *fid,
/* wait4 is not part of any standard, use at own risk
* not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
* --- offer@sgi.com */
#if !defined(__sgi)
#if !defined(__sgi) && !defined(__ALPHA__)
wait4(process_data->pid, NULL, 0, NULL);
#else
wait3((int *) NULL, 0, (rusage *) NULL);

View File

@@ -64,7 +64,6 @@ GENERICOBJS= \
$(GENDIR)/colrdlgg.$(OBJSUFF) \
$(GENDIR)/fontdlgg.$(OBJSUFF) \
$(GENDIR)/gridg.$(OBJSUFF) \
$(GENDIR)/helpxlp.$(OBJSUFF) \
$(GENDIR)/laywin.$(OBJSUFF) \
$(GENDIR)/msgdlgg.$(OBJSUFF) \
$(GENDIR)/panelg.$(OBJSUFF) \
@@ -124,19 +123,22 @@ COMMONOBJS = \
$(COMMDIR)/datstrm.$(OBJSUFF) \
$(COMMDIR)/objstrm.$(OBJSUFF) \
$(COMMDIR)/extended.$(OBJSUFF) \
$(COMMDIR)/socket.$(OBJSUFF) \
$(COMMDIR)/sckaddr.$(OBJSUFF) \
$(COMMDIR)/sckfile.$(OBJSUFF) \
$(COMMDIR)/sckipc.$(OBJSUFF) \
$(COMMDIR)/sckstrm.$(OBJSUFF) \
$(COMMDIR)/protocol.$(OBJSUFF) \
$(COMMDIR)/http.$(OBJSUFF) \
$(COMMDIR)/ftp.$(OBJSUFF) \
$(COMMDIR)/url.$(OBJSUFF) \
$(COMMDIR)/wincmn.$(OBJSUFF)
# Unfortunately, GnuWin32 fails with a syntax error in Sockets.h,
# so remove socket code.
# $(COMMDIR)/socket.$(OBJSUFF) \
# $(COMMDIR)/sckaddr.$(OBJSUFF) \
# $(COMMDIR)/sckfile.$(OBJSUFF) \
# $(COMMDIR)/sckipc.$(OBJSUFF) \
# $(COMMDIR)/sckstrm.$(OBJSUFF) \
# $(COMMDIR)/protocol.$(OBJSUFF) \
# $(COMMDIR)/http.$(OBJSUFF) \
# $(COMMDIR)/ftp.$(OBJSUFF) \
# $(COMMDIR)/url.$(OBJSUFF) \
# This must be renamed! It conflicts with the g++ fstream.h.
# $(COMMDIR)/fstream.$(OBJSUFF) \
# NOTE: if the socket-related files above fail with a syntax error in Sockets.h,
# remove the files (probably all GnuWin32 releases < b20).
MSWOBJS = \
accel.$(OBJSUFF) \

View File

@@ -194,7 +194,7 @@ wxRegKey::wxRegKey()
wxRegKey::wxRegKey(const wxString& strKey) : m_strKey(strKey)
{
m_hRootKey = (WXHKEY) aStdKeys[ExtractKeyName(m_strKey)].hkey;
m_hKey = NULL;
m_hKey = (WXHKEY) NULL;
m_dwLastError = 0;
}
@@ -203,7 +203,7 @@ wxRegKey::wxRegKey(StdKey keyParent, const wxString& strKey) : m_strKey(strKey)
{
RemoveTrailingSeparator(m_strKey);
m_hRootKey = (WXHKEY) aStdKeys[keyParent].hkey;
m_hKey = NULL;
m_hKey = (WXHKEY) NULL;
m_dwLastError = 0;
}
@@ -221,7 +221,7 @@ wxRegKey::wxRegKey(const wxRegKey& keyParent, const wxString& strKey)
RemoveTrailingSeparator(m_strKey);
m_hRootKey = keyParent.m_hRootKey;
m_hKey = NULL;
m_hKey = (WXHKEY) NULL;
m_dwLastError = 0;
}
@@ -562,7 +562,7 @@ wxRegKey::ValueType wxRegKey::GetValueType(const char *szValue)
bool wxRegKey::SetValue(const char *szValue, long lValue)
{
if ( CONST_CAST Open() ) {
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, RESERVED, REG_DWORD,
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_DWORD,
(RegString)&lValue, sizeof(lValue));
if ( m_dwLastError == ERROR_SUCCESS )
return TRUE;
@@ -640,7 +640,7 @@ bool wxRegKey::SetValue(const char *szValue, const wxString& strValue)
{
if ( CONST_CAST Open() ) {
#ifdef __WIN32__
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, RESERVED, REG_SZ,
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_SZ,
(RegString)strValue.c_str(),
strValue.Len() + 1);
if ( m_dwLastError == ERROR_SUCCESS )

View File

@@ -467,7 +467,7 @@ wxTreeItemId wxTreeCtrl::DoInsertItem(const wxTreeItemId& parent,
mask |= TVIF_IMAGE;
tvIns.item.iImage = image;
if ( selectedImage = -1 )
if ( selectedImage == -1 )
{
// take the same image for selected icon if not specified
selectedImage = image;

View File

@@ -40,10 +40,6 @@
#ifdef __GNUWIN32__
#include <sys/unistd.h>
#include <sys/stat.h>
#ifndef __MINGW32__
#include <std.h>
#endif
#endif
#ifdef __WIN32__