Committing in .

Patches for VMS

 Modified Files:
 	wxWindows/setup.h_vms wxWindows/include/wx/image.h
 	wxWindows/src/common/datetime.cpp
 	wxWindows/src/common/descrip.mms
 	wxWindows/src/generic/descrip.mms
 	wxWindows/src/unix/threadpsx.cpp
 ----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jouk Jansen
1999-12-23 13:19:09 +00:00
parent 73c0666118
commit fb10f04c95
6 changed files with 61 additions and 19 deletions

View File

@@ -185,7 +185,7 @@ public:
static void InitStandardHandlers(); static void InitStandardHandlers();
// GRG: Dic/99 // GRG: Dic/99
unsigned long CountColours( unsigned long stopafter = -1 ); unsigned long CountColours( unsigned long stopafter = (unsigned long) -1 );
unsigned long ComputeHistogram( wxHashTable &h ); unsigned long ComputeHistogram( wxHashTable &h );

View File

@@ -137,7 +137,7 @@
/* /*
* Use Threads * Use Threads
*/ */
#define wxUSE_THREADS 0 #define wxUSE_THREADS 1
/* /*
* Have glibc2 * Have glibc2
*/ */
@@ -312,6 +312,16 @@
*/ */
#define wxUSE_TOOLBAR 1 #define wxUSE_TOOLBAR 1
/* If 1, use the native toolbar, otherwise use the generic version
* (wxToolBarSimple) which may also be use together with the native one.
*/
#define wxUSE_TOOLBAR_NATIVE 1
/*
* Use generic wxToolBar instead of/together with the native one?
*/
#define wxUSE_TOOLBAR_SIMPLE 1
#if defined(__WXWINE__) || defined(__GNUWIN32__) #if defined(__WXWINE__) || defined(__GNUWIN32__)
#define wxUSE_OWNER_DRAWN 1 #define wxUSE_OWNER_DRAWN 1
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
@@ -600,8 +610,11 @@
*/ */
#define CONST_COMPATIBILITY 0 #define CONST_COMPATIBILITY 0
/* define with the name of timezone variable */
#undef WX_TIMEZONE
/* The type of 3rd argument to getsockname() - usually size_t or int */ /* The type of 3rd argument to getsockname() - usually size_t or int */
#define SOCKLEN_T int #define SOCKLEN_T size_t
/* gettimeofday() usually takes 2 arguments, but some really old systems might /* gettimeofday() usually takes 2 arguments, but some really old systems might
* have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */ * have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */
@@ -630,16 +643,19 @@
#undef HAVE_SCHED_YIELD #undef HAVE_SCHED_YIELD
/* Define if you have pthread_cancel */ /* Define if you have pthread_cancel */
#undef HAVE_PTHREAD_CANCEL #define HAVE_PTHREAD_CANCEL 1
/* Define if you have shl_load() */ /* Define if you have shl_load() */
#undef HAVE_SHL_LOAD #undef HAVE_SHL_LOAD
/* Define if you have strptime() */
#define HAVE_STRPTIME 1
/* Define if you have all functions to set thread priority */ /* Define if you have all functions to set thread priority */
#undef HAVE_THREAD_PRIORITY_FUNCTIONS #define HAVE_THREAD_PRIORITY_FUNCTIONS 1
/* Define if you can specify exit functions to a thread */ /* Define if you can specify exit functions to a thread */
#undef HAVE_THREAD_CLEANUP_FUNCTIONS #define HAVE_THREAD_CLEANUP_FUNCTIONS 1
/* Define if you have timegm() function */ /* Define if you have timegm() function */
#undef HAVE_TIMEGM #undef HAVE_TIMEGM

View File

@@ -1128,6 +1128,9 @@ wxDateTime& wxDateTime::Set(double jdn)
wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
{ {
#ifdef __VMS__
int time2;
#endif
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") ); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") );
time_t time = GetTicks(); time_t time = GetTicks();
@@ -1146,7 +1149,12 @@ wxDateTime::Tm wxDateTime::GetTm(const TimeZone& tz) const
else else
{ {
time += tz.GetOffset(); time += tz.GetOffset();
#ifdef __VMS__ /* time is unsigned so VMS gives a warning on the original */
time2 = (int) time;
if ( time2 >= 0 )
#else
if ( time >= 0 ) if ( time >= 0 )
#endif
{ {
tm = gmtime(&time); tm = gmtime(&time);
@@ -1642,6 +1650,9 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz)
wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
{ {
#ifdef __VMS__
int time2;
#endif
wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") ); wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") );
time_t time = GetTicks(); time_t time = GetTicks();
@@ -1661,7 +1672,12 @@ wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
{ {
time += tz.GetOffset(); time += tz.GetOffset();
#ifdef __VMS__ /* time is unsigned so VMS gives a warning on the original */
time2 = (int) time;
if ( time2 >= 0 )
#else
if ( time >= 0 ) if ( time >= 0 )
#endif
{ {
tm = gmtime(&time); tm = gmtime(&time);

View File

@@ -37,7 +37,7 @@ OBJECTS = \
config.obj,\ config.obj,\
ctrlcmn.obj,\ ctrlcmn.obj,\
ctrlsub.obj,\ ctrlsub.obj,\
date.obj,\ datetime.obj,\
datstrm.obj,\ datstrm.obj,\
db.obj,\ db.obj,\
dbtable.obj,\ dbtable.obj,\
@@ -82,6 +82,7 @@ OBJECTS1=framecmn.obj,\
lboxcmn.obj,\ lboxcmn.obj,\
list.obj,\ list.obj,\
log.obj,\ log.obj,\
longlong.obj,\
memory.obj,\ memory.obj,\
menucmn.obj,\ menucmn.obj,\
mimetype.obj,\ mimetype.obj,\
@@ -105,10 +106,8 @@ OBJECTS1=framecmn.obj,\
stream.obj,\ stream.obj,\
string.obj,\ string.obj,\
tbarbase.obj,\ tbarbase.obj,\
tbarsmpl.obj,\
textcmn.obj,\ textcmn.obj,\
textfile.obj,\ textfile.obj,\
time.obj,\
timercmn.obj,\ timercmn.obj,\
tokenzr.obj,\ tokenzr.obj,\
txtstrm.obj,\ txtstrm.obj,\
@@ -135,7 +134,7 @@ SOURCES = \
config.cpp,\ config.cpp,\
ctrlcmn.cpp,\ ctrlcmn.cpp,\
ctrlsub.cpp,\ ctrlsub.cpp,\
date.cpp,\ datetime.cpp,\
datstrm.cpp,\ datstrm.cpp,\
db.cpp,\ db.cpp,\
dbtable.cpp,\ dbtable.cpp,\
@@ -179,6 +178,7 @@ SOURCES = \
lboxcmn.cpp,\ lboxcmn.cpp,\
list.cpp,\ list.cpp,\
log.cpp,\ log.cpp,\
longlong.cpp,\
memory.cpp,\ memory.cpp,\
menucmn.cpp,\ menucmn.cpp,\
mimetype.cpp,\ mimetype.cpp,\
@@ -202,10 +202,8 @@ SOURCES = \
stream.cpp,\ stream.cpp,\
string.cpp,\ string.cpp,\
tbarbase.cpp,\ tbarbase.cpp,\
tbarsmpl.cpp,\
textcmn.cpp,\ textcmn.cpp,\
textfile.cpp,\ textfile.cpp,\
time.cpp,\
timercmn.cpp,\ timercmn.cpp,\
tokenzr.cpp,\ tokenzr.cpp,\
txtstrm.cpp,\ txtstrm.cpp,\
@@ -257,7 +255,7 @@ cmndata.obj : cmndata.cpp
config.obj : config.cpp config.obj : config.cpp
ctrlcmn.obj : ctrlcmn.cpp ctrlcmn.obj : ctrlcmn.cpp
ctrlsub.obj : ctrlsub.cpp ctrlsub.obj : ctrlsub.cpp
date.obj : date.cpp datetime.obj : datetime.cpp
datstrm.obj : datstrm.cpp datstrm.obj : datstrm.cpp
db.obj : db.cpp db.obj : db.cpp
dbtable.obj : dbtable.cpp dbtable.obj : dbtable.cpp
@@ -301,6 +299,7 @@ layout.obj : layout.cpp
lboxcmn.obj : lboxcmn.cpp lboxcmn.obj : lboxcmn.cpp
list.obj : list.cpp list.obj : list.cpp
log.obj : log.cpp log.obj : log.cpp
longlong.obj : longlong.cpp
memory.obj : memory.cpp memory.obj : memory.cpp
menucmn.obj : menucmn.cpp menucmn.obj : menucmn.cpp
mimetype.obj : mimetype.cpp mimetype.obj : mimetype.cpp
@@ -324,10 +323,8 @@ strconv.obj : strconv.cpp
stream.obj : stream.cpp stream.obj : stream.cpp
string.obj : string.cpp string.obj : string.cpp
tbarbase.obj : tbarbase.cpp tbarbase.obj : tbarbase.cpp
tbarsmpl.obj : tbarsmpl.cpp
textcmn.obj : textcmn.cpp textcmn.obj : textcmn.cpp
textfile.obj : textfile.cpp textfile.obj : textfile.cpp
time.obj : time.cpp
timercmn.obj : timercmn.cpp timercmn.obj : timercmn.cpp
tokenzr.obj : tokenzr.cpp tokenzr.obj : tokenzr.cpp
txtstrm.obj : txtstrm.cpp txtstrm.obj : txtstrm.cpp

View File

@@ -51,6 +51,7 @@ OBJECTS = \
splitter.obj,\ splitter.obj,\
statline.obj,\ statline.obj,\
statusbr.obj,\ statusbr.obj,\
tbarsmpl.obj,\
tabg.obj,\ tabg.obj,\
textdlgg.obj,\ textdlgg.obj,\
tipdlg.obj,\ tipdlg.obj,\
@@ -89,6 +90,7 @@ SOURCES = \
splitter.cpp,\ splitter.cpp,\
statline.cpp,\ statline.cpp,\
statusbr.cpp,\ statusbr.cpp,\
tbarsmpl.cpp,\
tabg.cpp,\ tabg.cpp,\
textdlgg.cpp,\ textdlgg.cpp,\
tipdlg.cpp,\ tipdlg.cpp,\
@@ -133,6 +135,7 @@ scrolwin.obj : scrolwin.cpp
splitter.obj : splitter.cpp splitter.obj : splitter.cpp
statline.obj : statline.cpp statline.obj : statline.cpp
statusbr.obj : statusbr.cpp statusbr.obj : statusbr.cpp
tbarsmpl.obj : tbarsmpl.cpp
tabg.obj : tabg.cpp tabg.obj : tabg.cpp
textdlgg.obj : textdlgg.cpp textdlgg.obj : textdlgg.cpp
tipdlg.obj : tipdlg.cpp tipdlg.obj : tipdlg.cpp

View File

@@ -933,8 +933,18 @@ wxThreadError wxThread::Create()
wxLogError(_("Cannot retrieve thread scheduling policy.")); wxLogError(_("Cannot retrieve thread scheduling policy."));
} }
int min_prio = sched_get_priority_min(policy), #ifdef __VMS__
max_prio = sched_get_priority_max(policy), /* the pthread.h contains too many spaces. This is a work-around */
# undef sched_get_priority_max
#undef sched_get_priority_min
#define sched_get_priority_max(_pol_) \
(_pol_ == SCHED_OTHER ? PRI_FG_MAX_NP : PRI_FIFO_MAX)
#define sched_get_priority_min(_pol_) \
(_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN)
#endif
int max_prio = sched_get_priority_max(policy),
min_prio = sched_get_priority_min(policy),
prio = m_internal->GetPriority(); prio = m_internal->GetPriority();
if ( min_prio == -1 || max_prio == -1 ) if ( min_prio == -1 || max_prio == -1 )