bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty install


From: bug-ddd
Subject: ddd/MString.h problems in 3.3 with Solaris C++ compiler, liberty install problems
Date: Wed, 21 Feb 2001 18:27:30 -0600
User-agent: Mutt/1.1.12i

ddd/MString.h has:

public:
    // Constructors
    MString(const char *text = "",
            XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
        _mstring(text ? XmStringCreateLtoR((char *)text, charset) : 0)
    {
        assert(OK());
    }

#if 0
    MString(char *text,
            XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
        _mstring(text ? XmStringCreateLtoR(text, charset) : 0)
    {
        assert(OK());
    }
#endif

The Sun C++ compiler (5.0 and 5.2) complains with:
  CC -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I/opt/TWWfsw/xpm/include
  -I/usr/dt/include -I/usr/openwin/include
  -I/opt/TWWfsw/readline4/include   -DNDEBUG -xs  -xO2 -xtarget=generic
  -xarch=v8    -c ddd.C
  "MString.h", line 57: Error: Formal argument text of type char* in
  call to XmStringCreateLtoR(char*, char*) is being passed const char*.

Why was the constructor changed? Patch below to revert. Incidentally,
neither G++ 2.95.2 nor IRIX C++ 7.3.1m and 7.3.1.2m complain.

Also, libiberty should install its lib directory before installing
files in it. Patch attached.

-- 
albert chin (address@hidden)

-- snip snip
--- ddd/MString.h.orig  Wed Feb 21 18:20:45 2001
+++ ddd/MString.h       Wed Feb 21 18:21:07 2001
@@ -52,21 +52,12 @@
 
 public:
     // Constructors
-    MString(const char *text = "",
-           XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
-       _mstring(text ? XmStringCreateLtoR((char *)text, charset) : 0)
-    {
-       assert(OK());
-    }
-
-#if 0
-    MString(char *text,
+    MString(char *text = "",
            XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
        _mstring(text ? XmStringCreateLtoR(text, charset) : 0)
     {
        assert(OK());
     }
-#endif
 
     MString(const string& text,
            XmStringCharSet charset = MSTRING_DEFAULT_CHARSET):
--- libiberty/Makefile.in.orig  Wed Feb 21 17:26:02 2001
+++ libiberty/Makefile.in       Wed Feb 21 18:17:54 2001
@@ -37,6 +37,8 @@
 
 SHELL = @SHELL@
 
+mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs
+
 # Multilib support variables.
 MULTISRCTOP =
 MULTIBUILDTOP =
@@ -152,12 +154,14 @@
 install: install_to_$(INSTALL_DEST) install-subdir
 
 install_to_libdir: all
+       $(mkinstalldirs) $(libdir)$(MULTISUBDIR)
        $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
        ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
        mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n 
$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
        @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install_to_tooldir: all
+       $(mkinstalldirs) $(tooldir)/lib$(MULTISUBDIR)
        $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
        ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
        mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n 
$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]