delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/09/13:00:20

From: Yaoting Chiu <sothat AT alleyoop DOT m8 DOT ntu DOT edu DOT tw>
Newsgroups: comp.os.msdos.djgpp
Subject: Port RHIDE to FreeBSD
Date: 9 Apr 2001 16:45:56 GMT
Organization: National Taiwan University
Lines: 149
Message-ID: <9asp04$6fk$1@gemini.ntu.edu.tw>
NNTP-Posting-Host: alleyoop.m8.ntu.edu.tw
X-Trace: gemini.ntu.edu.tw 986834756 6644 140.112.251.238 (9 Apr 2001 16:45:56 GMT)
X-Complaints-To: postmaster AT news DOT ntu DOT edu DOT tw
NNTP-Posting-Date: 9 Apr 2001 16:45:56 GMT
User-Agent: tin/1.5.6-20000803 ("Dust") (UNIX) (FreeBSD/4.3-RC (i386))
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all:

      While I port RHIDE to FreeBSD , I met some problem and need help.

  ( However , it seems hard to even compile under linux platform, too. 
  Can any body tell me which linux distribution I can compile with no 
  error ? )

  gmake[2]: Leaving directory `/usr/home/sothat/rhide-1.4.7/libide/stream'
  gcc  -I/usr/home/sothat/rhide-1.4.7/libide/include -I/usr/home/sothat/rhide-1.4.7/libtvuti/include -I/usr/home/sothat/rhide-1.4.7/librhuti -I/usr/home/sothat/rhide-1.4.7/tvision/include -I/usr/home/sothat/rhide-1.4.7/libset/include -I/usr/home/sothat/rhide-1.4.7/libset/settvuti/include -I/usr/local/include -g -O2  -Wall -W    -DRHIDE     -fno-exceptions -fno-rtti -funsigned-char    -c tidefile.cc -o tidefile.o
  tidefile.cc: In method `void TIDEFileEditor::setFormatLine()':
  tidefile.cc:71: taking the address of a non-static member function
  tidefile.cc:71:   to form a pointer to member function, say `&TIDEFileEditor::formatLine'

      Here, in tidefile.cc:71 , I can't overcome this compile error . Include 
  define the TIDEFileEditor::formatLine as a static function but in vain because 
  it induce another problem.
  Though , this error will not occur while compile in a remote linux I can access.

  Is it the problem of the version of gcc or something? 
  in my freebsd box:
  FreeBSD alleyoop.m8.ntu.edu.tw 4.3-RC FreeBSD 4.3-RC #0: Sat Mar 24 04:27:27 CST 2001     root AT alleyoop DOT m8 DOT ntu DOT edu DOT tw:/temp/obj/usr/src/sys/GILOFRE  i386
  Using builtin specs.
  gcc version 2.95.2 19991024 (release)
  I put the patch i used on my freebsd box.

  Another problem is ftime(2). According to man page from the linux box I can 
  access:

  CONFORMING TO
   BSD 4.2
   Under  BSD 4.3, this call is obsoleted by gettimeofday(2).

     Else , FreeBSD need libintl.h which is the header from gettext.
  While it was install in /usr/local/include, I should patch some *.mak
  to locate libintl.h.

  Thanks for your help.

  Regards, sothat.

The patch i used on my freebsd box.

--- ./libide/stream/stream.mak.orig     Mon Apr  9 22:32:22 2001
+++ ./libide/stream/stream.mak  Mon Apr  9 22:32:44 2001
@@ -256,7 +256,7 @@
        -funsigned-char
 INCLUDE_DIRS=$(RHIDESRC)/libide/include $(RHIDESRC)/libtvuti/include\
        $(RHIDESRC)/librhuti $(RHIDESRC)/tvision/include\
-       $(RHIDESRC)/libset/include $(RHIDESRC)/libset/settvuti/include
+       $(RHIDESRC)/libset/include $(RHIDESRC)/libset/settvuti/include /usr/local/include
 LIB_DIRS=
 C_DEBUG_FLAGS=
 C_OPT_FLAGS=-O2
--- ./libide/libide.mak.orig    Mon Nov 16 07:44:50 1998
+++ ./libide/libide.mak Mon Apr  9 22:39:40 2001
@@ -256,11 +256,12 @@
        -funsigned-char
 INCLUDE_DIRS=$(RHIDESRC)/libide/include $(RHIDESRC)/libtvuti/include\
        $(RHIDESRC)/librhuti $(RHIDESRC)/tvision/include\
-       $(RHIDESRC)/libset/include $(RHIDESRC)/libset/settvuti/include
+       $(RHIDESRC)/libset/include $(RHIDESRC)/libset/settvuti/include /usr/local/include
 LIB_DIRS=
 C_DEBUG_FLAGS=-g
 C_OPT_FLAGS=-O2
-C_WARN_FLAGS=-Wall -W -Werror
+#C_WARN_FLAGS=-Wall -W -Werror
+C_WARN_FLAGS=-Wall -W 
 C_C_LANG_FLAGS=
 C_CXX_LANG_FLAGS=
 C_P_LANG_FLAGS=
--- ./libide/tidefile.cc.orig   Thu Sep 17 02:40:24 1998
+++ ./libide/tidefile.cc        Mon Apr  9 23:47:06 2001
@@ -22,6 +22,7 @@
 #include <utime.h>
 #include <sys/stat.h>
 #include <sys/timeb.h>
+#include <sys/types.h>
 #include <stdio.h>
 #include <unistd.h>
 
@@ -102,7 +103,14 @@
   else
   {
     struct timeb tb;
-    ftime(&tb);
+    //ftime(&tb); 
+    struct timeval tb1;
+    struct timezone tb2;
+    gettimeofday(&tb1,&tb2); 
+    tb.time=tb1.tv_sec;
+    tb.millitm=tb1.tv_usec;
+    tb.timezone=tb2.tz_minuteswest;
+    tb.dstflag=tb2.tz_dsttime;
 #ifdef __DJGPP__
     edittime = tb.time & ~(1UL); //round up to a 2 sec boundary
 #endif
@@ -196,7 +204,14 @@
   if (modified == True && !savecmd) // it was a real modification
   {
     struct timeb tb;
-    ftime(&tb);
+    //ftime(&tb);
+    struct timeval tb1;
+    struct timezone tb2;
+    gettimeofday(&tb1,&tb2); 
+    tb.time=tb1.tv_sec;
+    tb.millitm=tb1.tv_usec;
+    tb.timezone=tb2.tz_minuteswest;
+    tb.dstflag=tb2.tz_dsttime;
     edittime = tb.time & ~(1UL); //round up to a 2 sec boundary
     message(TProgram::application,evBroadcast,cmEditorModified,(void *)edittime);
   }
@@ -291,7 +306,14 @@
   else
   { 
     struct timeb tb;
-    ftime(&tb);
+    //ftime(&tb);
+    struct timeval tb1;
+    struct timezone tb2;
+    gettimeofday(&tb1,&tb2);
+    tb.time=tb1.tv_sec;
+    tb.millitm=tb1.tv_usec;
+    tb.timezone=tb2.tz_minuteswest;
+    tb.dstflag=tb2.tz_dsttime;
     edittime = tb.time & ~(1UL); //round up to a 2 sec boundary
   }
   BaseName(fileName,bname);
--- ./libset/include/ced_clas.h.orig    Mon Apr  9 22:34:02 2001
+++ ./libset/include/ced_clas.h Mon Apr  9 22:35:09 2001
@@ -55,7 +55,7 @@
 public:
  LineLengthArray();
  ~LineLengthArray();
- operator [](unsigned pos) { return pos >= Length ? 0 : elArray[pos]; };
+ unsigned operator [](unsigned pos) { return pos >= Length ? 0 : elArray[pos]; };
  void set(unsigned pos, uint16 val);
  void insert(unsigned pos, uint16 val);
  void del(unsigned pos);
--- ./INSTALL.LINUX.orig        Mon Apr  9 23:34:04 2001
+++ ./INSTALL.LINUX     Mon Apr  9 22:28:43 2001
@@ -44,4 +44,4 @@
 # Because I'm not so familar with shell scripts, I use
 # a makefile, which I know how to write.

-make -f INSTALL.MAK install $*
+gmake -f INSTALL.MAK install $*

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019