Fixed compiler errors on Linux
authormike <mike>
Tue, 17 Jul 2001 01:40:40 +0000 (01:40 +0000)
committermike <mike>
Tue, 17 Jul 2001 01:40:40 +0000 (01:40 +0000)
doc/changelog.txt
mak/library-unix.mak
src/Pegasus/Server/ClientConnection.cpp
src/utils/mu/Config.h
src/utils/mu/DependCmd.cpp
src/utils/mu/Files.cpp
src/utils/mu/Makefile
src/utils/mu/mu.cpp

index cda6dde8d727aec3205334225f92c2843400ec62..088e258dc46678a53315e5a5bae84e6578ffb1c5 100644 (file)
@@ -36,6 +36,10 @@ Version 0.98.0 - Work in progress
 
 10. (Mike Brasher) - Changed CIMOMHandle to carry repository pointer.
 
+11. (Mike Brasher) - Ported to TRU64.
+
+12. (Mike Brasher) - Fixed compiler error on Linux.
+
 ------------------------------------------------------------------------------
 --
 
index c4ca4e98b1f0ec8db0506019317d5f6977949e1b..c45e8d97333e9a0b5e5e5249a5fd6bff50c68394 100644 (file)
@@ -46,14 +46,13 @@ ifneq ($(COMPILER),xlc)
        $(LINK_COMMAND) $(LINK_ARGUMENTS) -L$(LIB_DIR) $(LINK_OUT)$(FULL_LIB) $(OBJECTS) $(DYNAMIC_LIBRARIES)
   else
        $(LINK_COMMAND) $(LINK_ARGUMENTS) $(LINK_OUT) $(FULL_LIB) $(OBJECTS) $(LIBRARIES)
-       $(TOUCH) $(FULL_LIB)
   endif
 else
        ar crv $(PEGASUS_PLATFORM).lib $(OBJECTS) $(LIBRARIES)
        $(LINK_COMMAND) $(LINK_ARGUMENTS) $(LINK_OUT)$(FULL_LIB) $(PEGASUS_PLATFORM).lib
        rm -f $(PEGASUS_PLATFORM).lib
-       $(TOUCH) $(FULL_LIB)
 endif
+       $(TOUCH) $(FULL_LIB)
        @ $(ECHO)
 
 clean-lib: $(ERROR)
index 3d8b218a7917d118cacb4c355d49ba357c51d2c6..c075a160691c8268f52767a791fe5a8be0d6b48f 100644 (file)
@@ -27,6 +27,7 @@
 //%/////////////////////////////////////////////////////////////////////////////
 
 #include <cctype>
+#include <cstdio>
 #include "ClientConnection.h"
 #include <Pegasus/Common/XmlParser.h>
 #include <Pegasus/Common/XmlReader.h>
index 66bd9e536e511ff1e0d17e3230503315f26a0fa3..c893c2aced0be8dae969f5c713325e33cbadf56b 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef _Config_h
 #define _Config_h
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
 # define for if (0) ; else for
 namespace std { };
 using namespace std;
index 9dab3d0f4a558e92386b2eccfacf8994d2c6d3f9..4747d80c78d8741fb1b60945f941dabf57a687f7 100644 (file)
 #include <cassert>
 #include "DependCmd.h"
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
 # define OBJ_EXT ".obj"
 #else
 # define OBJ_EXT ".o"
 #endif
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
 using namespace std;
 #endif
 
index aaa70a9b2e94b6f13e1d75ed0fed3b334b77ae10..7c6665a0bbc4b2571dbf8ac8c122ddeaf2ea11f8 100644 (file)
@@ -294,7 +294,13 @@ bool Glob(const string& pattern_, vector<string>& fileNames)
     string pattern = pattern_;
 
     while (pattern.size() > 0 && pattern[pattern.size()-1] == '/')
+    {
+#ifdef OS_TRU64
        pattern.remove(pattern.size() - 1);
+#else
+       pattern.erase(pattern.end() - 1);
+#endif
+    }
 
     // Split the pattern into directory name and base name:
 
@@ -338,7 +344,7 @@ bool CopyFile(const string& from_file, const string& to_file)
 {
     // Open input file:
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
     ifstream is(from_file.c_str(), ios::binary);
 #else
     ifstream is(from_file.c_str());
@@ -349,7 +355,7 @@ bool CopyFile(const string& from_file, const string& to_file)
 
     // Open output file:
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
     ofstream os(to_file.c_str(), ios::binary);
 #else
     ofstream os(to_file.c_str());
@@ -417,7 +423,7 @@ bool CompareFiles(
     const string& filename2, 
     size_t& offset)
 {
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
     ifstream is1(filename1.c_str(), ios::binary);
 #else
     ifstream is1(filename1.c_str());
@@ -426,7 +432,7 @@ bool CompareFiles(
     if (!is1)
        return false;
 
-#ifdef OS_TYPE_WINDOWS
+#ifdef OS_WINDOWS
     ifstream is2(filename2.c_str(), ios::binary);
 #else
     ifstream is2(filename2.c_str());
index 4a2faeef3c955d2b389414bf0e1be38d9e4214d6..19676c461c87b83aea3af45840351b440259c95c 100644 (file)
@@ -26,7 +26,7 @@ ifeq ($(OS),compaq_oss)
     LIBFLAGS = /usr/lib/crtlmain.o -obey /usr/lib/libc.obey
     SRLFLAGS = -l zrwslsrl -l zcplsrl -verbose
     LXX = nld
-    DEFINES = -DOS_TYPE_OSS
+    DEFINES = -DOS_OSS
     PROGRAM = mu
     EXE_OUT = -o
     RM = rm -f
@@ -38,7 +38,7 @@ ifeq ($(OS),windows)
     CXX = cl
     LXX = $(CXX)
     CXXFLAGS = -nologo -W3 -GX
-    DEFINES = -DOS_TYPE_WINDOWS
+    DEFINES = -DOS_WINDOWS
     PROGRAM = mu.exe
     EXE_OUT = -Fe
     RM = erase
@@ -50,7 +50,7 @@ ifeq ($(OS),unix)
     CXX = g++
     LXX = $(CXX)
     CXXFLAGS = -O2 -Wall -Wno-unused -pedantic
-    DEFINES = -DOS_TYPE_UNIX
+    DEFINES = -DOS_UNIX
     PROGRAM = mu
     EXE_OUT = -o
     RM = rm -f
@@ -62,7 +62,7 @@ ifeq ($(OS),tru64)
     CXX = g++
     LXX = $(CXX)
     CXXFLAGS = -O2 -Wall -Wno-unused -pedantic -I../../stdcxx/stream
-    DEFINES = -DOS_TYPE_UNIX
+    DEFINES = -DOS_TRU64
     PROGRAM = mu
     EXE_OUT = -o
     RM = rm -f
index 60a5bb3472005d6678ceec3eb82b80b80ec9e6c8..5619e11a221fe11499dd93c192c8619e79223431 100644 (file)
@@ -41,7 +41,7 @@
 
 const char HELP[] = 
 "\n"
-"MU (MakeUtility) Version 1.3\n"
+"MU (MakeUtility) Version 1.4\n"
 "\n"
 "Usage: mu command arguments ...\n"
 "\n"