From 39b307b82fd873bfcf553e98d93de0876fea0476 Mon Sep 17 00:00:00 2001 From: Jouk Jansen Date: Mon, 22 Nov 1999 14:31:37 +0000 Subject: [PATCH] Committing in . samples/config/contest.cpp compilation on VMS Bug fix for "double home directory in fileconf.cpp Modified Files: wxWindows/descrip.mms wxWindows/src/common/fileconf.cpp Added Files: wxWindows/samples/config/conftest.opt wxWindows/samples/config/descrip.mms ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- descrip.mms | 2 ++ samples/config/conftest.opt | 6 ++++++ samples/config/descrip.mms | 30 ++++++++++++++++++++++++++++++ src/common/fileconf.cpp | 18 ++++++++++++++---- 4 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 samples/config/conftest.opt create mode 100644 samples/config/descrip.mms diff --git a/descrip.mms b/descrip.mms index 6a0cd35932..b3ea7d3d30 100644 --- a/descrip.mms +++ b/descrip.mms @@ -21,6 +21,8 @@ all : setup.h $(MMS)$(MMSQUALIFIERS) set default [-.checklst] $(MMS)$(MMSQUALIFIERS) + set default [-.config] + $(MMS)$(MMSQUALIFIERS) set default [-.dialogs] $(MMS)$(MMSQUALIFIERS) set default [-.image] diff --git a/samples/config/conftest.opt b/samples/config/conftest.opt new file mode 100644 index 0000000000..e05c8573fc --- /dev/null +++ b/samples/config/conftest.opt @@ -0,0 +1,6 @@ +[--.lib]libwx_motif.olb/lib +sys$library:decw$xlibshr.exe/share +sys$library:decw$xtlibshrr5.exe/share +sys$library:decw$xmlibshr12.exe/share +sys$library:decw$xmulibshrr5.exe/share +X11:libxpm.olb/lib diff --git a/samples/config/descrip.mms b/samples/config/descrip.mms new file mode 100644 index 0000000000..dc0b8b900a --- /dev/null +++ b/samples/config/descrip.mms @@ -0,0 +1,30 @@ +#***************************************************************************** +# * +# Make file for VMS * +# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) * +# Date : 10 November 1999 * +# * +#***************************************************************************** +.first + define wx [--.include.wx] + +.ifdef __WXMOTIF__ +CXX_DEFINE = /define=(__WXMOTIF__=1) +.else +CXX_DEFINE = +.endif + +.suffixes : .cpp + +.cpp.obj : + cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp + +all : + $(MMS)$(MMSQUALIFIERS) conftest.exe + +conftest.exe : conftest.obj +.ifdef __WXMOTIF__ + cxxlink conftest,conftest/opt +.endif + +conftest.obj : conftest.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 80b528c70e..54bc21641a 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -98,7 +98,9 @@ wxString wxFileConfig::GetGlobalDir() { wxString strDir; - #ifdef __UNIX__ + #ifdef __VMS__ // Note if __VMS is defined __UNIX is also defined + strDir = wxT("sys$manager:"); + #elif defined( __UNIX__ ) strDir = wxT("/etc/"); #elif defined(__WXPM__) ULONG aulSysInfo[QSV_MAX] = {0}; @@ -225,11 +227,13 @@ wxString wxFileConfig::GetLocalDir() #ifndef __WXMAC__ wxGetHomeDir(&strDir); -#ifdef __UNIX__ +#ifndef __VMS__ +# ifdef __UNIX__ if (strDir.Last() != wxT('/')) strDir << wxT('/'); #else if (strDir.Last() != wxT('\\')) strDir << wxT('\\'); #endif +#endif #else // no local dir concept on mac return GetGlobalDir() ; @@ -257,8 +261,14 @@ wxString wxFileConfig::GetGlobalFileName(const wxChar *szFile) wxString wxFileConfig::GetLocalFileName(const wxChar *szFile) { - wxString str = GetLocalDir(); - +#ifdef __VMS__ // On VMS I saw the problem that the home directory was appended + // twice for the configuration file. Does that also happen for other + // platforms? + wxString str = wxT( ' ' ); +#else + wxString str = GetLocalDir(); +#endif + #ifdef __UNIX__ str << wxT('.'); #endif