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
static void InitStandardHandlers();
// GRG: Dic/99
static void InitStandardHandlers();
// 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 );
*/
#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__)
#define wxUSE_OWNER_DRAWN 1
#if wxUSE_TOOLBAR
#if defined(__WXWINE__) || defined(__GNUWIN32__)
#define wxUSE_OWNER_DRAWN 1
#if wxUSE_TOOLBAR
*/
#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 size_t
/* gettimeofday() usually takes 2 arguments, but some really old systems might
* have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */
/* gettimeofday() usually takes 2 arguments, but some really old systems might
* have only one, in which case define WX_GETTIMEOFDAY_NO_TZ */
#undef HAVE_SCHED_YIELD
/* Define if you have pthread_cancel */
#undef HAVE_SCHED_YIELD
/* Define if you have pthread_cancel */
-#undef HAVE_PTHREAD_CANCEL
+#define HAVE_PTHREAD_CANCEL 1
/* Define if you have shl_load() */
#undef HAVE_SHL_LOAD
/* Define if you 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 */
#undef HAVE_TIMEGM
/* Define if you have timegm() function */
#undef HAVE_TIMEGM
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") );
time_t time = GetTicks();
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime") );
time_t time = GetTicks();
else
{
time += tz.GetOffset();
else
{
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 )
+#endif
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") );
time_t time = GetTicks();
wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") );
time_t time = GetTicks();
{
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 )
+#endif
config.obj,\
ctrlcmn.obj,\
ctrlsub.obj,\
config.obj,\
ctrlcmn.obj,\
ctrlsub.obj,\
datstrm.obj,\
db.obj,\
dbtable.obj,\
datstrm.obj,\
db.obj,\
dbtable.obj,\
lboxcmn.obj,\
list.obj,\
log.obj,\
lboxcmn.obj,\
list.obj,\
log.obj,\
memory.obj,\
menucmn.obj,\
mimetype.obj,\
memory.obj,\
menucmn.obj,\
mimetype.obj,\
stream.obj,\
string.obj,\
tbarbase.obj,\
stream.obj,\
string.obj,\
tbarbase.obj,\
textcmn.obj,\
textfile.obj,\
textcmn.obj,\
textfile.obj,\
timercmn.obj,\
tokenzr.obj,\
txtstrm.obj,\
timercmn.obj,\
tokenzr.obj,\
txtstrm.obj,\
config.cpp,\
ctrlcmn.cpp,\
ctrlsub.cpp,\
config.cpp,\
ctrlcmn.cpp,\
ctrlsub.cpp,\
datstrm.cpp,\
db.cpp,\
dbtable.cpp,\
datstrm.cpp,\
db.cpp,\
dbtable.cpp,\
lboxcmn.cpp,\
list.cpp,\
log.cpp,\
lboxcmn.cpp,\
list.cpp,\
log.cpp,\
memory.cpp,\
menucmn.cpp,\
mimetype.cpp,\
memory.cpp,\
menucmn.cpp,\
mimetype.cpp,\
stream.cpp,\
string.cpp,\
tbarbase.cpp,\
stream.cpp,\
string.cpp,\
tbarbase.cpp,\
textcmn.cpp,\
textfile.cpp,\
textcmn.cpp,\
textfile.cpp,\
timercmn.cpp,\
tokenzr.cpp,\
txtstrm.cpp,\
timercmn.cpp,\
tokenzr.cpp,\
txtstrm.cpp,\
config.obj : config.cpp
ctrlcmn.obj : ctrlcmn.cpp
ctrlsub.obj : ctrlsub.cpp
config.obj : config.cpp
ctrlcmn.obj : ctrlcmn.cpp
ctrlsub.obj : ctrlsub.cpp
+datetime.obj : datetime.cpp
datstrm.obj : datstrm.cpp
db.obj : db.cpp
dbtable.obj : dbtable.cpp
datstrm.obj : datstrm.cpp
db.obj : db.cpp
dbtable.obj : dbtable.cpp
lboxcmn.obj : lboxcmn.cpp
list.obj : list.cpp
log.obj : log.cpp
lboxcmn.obj : lboxcmn.cpp
list.obj : list.cpp
log.obj : log.cpp
+longlong.obj : longlong.cpp
memory.obj : memory.cpp
menucmn.obj : menucmn.cpp
mimetype.obj : mimetype.cpp
memory.obj : memory.cpp
menucmn.obj : menucmn.cpp
mimetype.obj : mimetype.cpp
stream.obj : stream.cpp
string.obj : string.cpp
tbarbase.obj : tbarbase.cpp
stream.obj : stream.cpp
string.obj : string.cpp
tbarbase.obj : tbarbase.cpp
-tbarsmpl.obj : tbarsmpl.cpp
textcmn.obj : textcmn.cpp
textfile.obj : textfile.cpp
textcmn.obj : textcmn.cpp
textfile.obj : textfile.cpp
timercmn.obj : timercmn.cpp
tokenzr.obj : tokenzr.cpp
txtstrm.obj : txtstrm.cpp
timercmn.obj : timercmn.cpp
tokenzr.obj : tokenzr.cpp
txtstrm.obj : txtstrm.cpp
splitter.obj,\
statline.obj,\
statusbr.obj,\
splitter.obj,\
statline.obj,\
statusbr.obj,\
tabg.obj,\
textdlgg.obj,\
tipdlg.obj,\
tabg.obj,\
textdlgg.obj,\
tipdlg.obj,\
splitter.cpp,\
statline.cpp,\
statusbr.cpp,\
splitter.cpp,\
statline.cpp,\
statusbr.cpp,\
tabg.cpp,\
textdlgg.cpp,\
tipdlg.cpp,\
tabg.cpp,\
textdlgg.cpp,\
tipdlg.cpp,\
splitter.obj : splitter.cpp
statline.obj : statline.cpp
statusbr.obj : statusbr.cpp
splitter.obj : splitter.cpp
statline.obj : statline.cpp
statusbr.obj : statusbr.cpp
+tbarsmpl.obj : tbarsmpl.cpp
tabg.obj : tabg.cpp
textdlgg.obj : textdlgg.cpp
tipdlg.obj : tipdlg.cpp
tabg.obj : tabg.cpp
textdlgg.obj : textdlgg.cpp
tipdlg.obj : tipdlg.cpp
wxLogError(_("Cannot retrieve thread scheduling policy."));
}
wxLogError(_("Cannot retrieve thread scheduling policy."));
}
- int min_prio = sched_get_priority_min(policy),
- max_prio = sched_get_priority_max(policy),
+#ifdef __VMS__
+ /* 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();
if ( min_prio == -1 || max_prio == -1 )
prio = m_internal->GetPriority();
if ( min_prio == -1 || max_prio == -1 )