Thanks for your continued help on this.

The attached patch (which contains the previous one) should fix those 
errors.  I'm not sure about the one in ResultMatch.cc.  If it still 
complains, could you please try putting
  ResultMatch::
at the start of line 231?

Once again, your help is greatly appreciated!
Lachlan

On Thu, 19 Jun 2003 00:54, Neil Kohl wrote:
> Lachlan,
>
> I applied the patch but it still won't compile. Following are the
> Error: lines from output of 'make -k check'. I have the entire make
> output saved if that would be helpful.
>
> "HtFTP.cc", line 175: Error: Cannot use const char* to initialize
> char*. "htdb_stat.cc", line 83: Error: Multiple declaration for
> internal. "htdb_stat.cc", line 108: Error: The operand "*internal"
> cannot be assigned to. "htdb_stat.cc", line 129: Error: The operand
> "*internal" cannot be assigned to. "htdb_stat.cc", line 548: Error:
> Formal argument 2 of type char* in call to
> CDB___lock_dump_region(__db_env*, char*, __FILE*) is being passed
> std::ios_base&(*)(std::ios_base&). "htdb_stat.cc", line 635: Error:
> Formal argument 2 of type char* in call to
> CDB___memp_dump_region(__db_env*, char*, __FILE*) is being passed
> std::ios_base&(*)(std::ios_base&). "ResultMatch.cc", line 231:
> Error: ResultMatch::SortType is not accessible from struct.
> "search.cc", line 2301: Error: An integer constant expression is
> required within the array subscript operator. "search.cc", line
> 2331: Error: An integer constant expression is required within the
> array subscript operator.
>
>
> Neil Kohl
> Manager, ACP Online
> American College of Physicians
> [EMAIL PROTECTED]              215.351.2638, 800.523.1546 x2638
>
> >>> Lachlan Andrew <[EMAIL PROTECTED]> 06/18/03 08:17AM >>>
>
> Thanks for that, Neil.
>
> That problem should be fixed in the attached patch.  Could you try
> "make -k" so that it will report as many errors at once as
> possible?
>
> Thanks again,
> Lachlan
>
> On Wed, 18 Jun 2003 02:15, Neil Kohl wrote:
> > The make of b5 on Solaris 9 with Sun c++ failed. Gory details
> > follow. I've got the complete configure and make output saved if
> > you need it.

-- 
[EMAIL PROTECTED]
ht://Dig developer DownUnder  (http://www.htdig.org)
diff -c -r ../cvs/htdig/db/configure ./db/configure
*** ../cvs/htdig/db/configure	Wed May 28 00:45:53 2003
--- ./db/configure	Thu Jun 19 21:42:11 2003
***************
*** 12698,12711 ****
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  /* System header to define __stub macros and hopefully few prototypes,
!     which can conflict with char $ac_func (); below.
!     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
!     <limits.h> exists even on freestanding compilers.  */
! #ifdef __STDC__
! # include <limits.h>
! #else
! # include <assert.h>
! #endif
  /* Override any gcc2 internal prototype to avoid an error.  */
  #ifdef __cplusplus
  extern "C"
--- 12698,12706 ----
  cat >>conftest.$ac_ext <<_ACEOF
  /* end confdefs.h.  */
  /* System header to define __stub macros and hopefully few prototypes,
!     which can conflict with char $ac_func (); below. */
! /* Don't use  limits.h  as it defines  select  on Sun's C++ compiler */
! #include <assert.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  #ifdef __cplusplus
  extern "C"
diff -c -r ../cvs/htdig/htcommon/URL.h ./htcommon/URL.h
*** ../cvs/htdig/htcommon/URL.h	Sat Jan 11 13:33:28 2003
--- ./htcommon/URL.h	Wed Jun 18 21:50:01 2003
***************
*** 91,97 ****
  //String &encodeURL(String &, char *valid = "[EMAIL PROTECTED]&/:");
  //String &encodeURL(String &, char *reserved = ";/?:@&=+$,");
  //	       	              char *unreserved = "-_.!~*'()");
! String &encodeURL(String &, char *valid = UNRESERVED);
  
  String &decodeURL(String &);
  
--- 91,97 ----
  //String &encodeURL(String &, char *valid = "[EMAIL PROTECTED]&/:");
  //String &encodeURL(String &, char *reserved = ";/?:@&=+$,");
  //	       	              char *unreserved = "-_.!~*'()");
! String &encodeURL(String &, char *valid = (char *)UNRESERVED);
  
  String &decodeURL(String &);
  
diff -c -r ../cvs/htdig/htdb/htdb_stat.cc ./htdb/htdb_stat.cc
*** ../cvs/htdig/htdb/htdb_stat.cc	Sun Feb  3 05:18:12 2002
--- ./htdb/htdb_stat.cc	Thu Jun 19 21:13:41 2003
***************
*** 80,86 ****
  
  DB_ENV	*dbenv;
  int	 interrupted;
! char	*internal;
  const char
  	*progname = "htdb_stat";				/* Program name. */
  
--- 80,86 ----
  
  DB_ENV	*dbenv;
  int	 interrupted;
! char	*stats_internal;
  const char
  	*progname = "htdb_stat";				/* Program name. */
  
***************
*** 105,111 ****
  		switch (ch) {
  		case 'C':
  			ttype = T_LOCK;
! 			if (!argcheck(internal = optarg, "Acflmo"))
  				usage();
  			break;
  		case 'c':
--- 105,111 ----
  		switch (ch) {
  		case 'C':
  			ttype = T_LOCK;
! 			if (!argcheck(stats_internal = optarg, "Acflmo"))
  				usage();
  			break;
  		case 'c':
***************
*** 126,132 ****
  			break;
  		case 'M':
  			ttype = T_MPOOL;
! 			if (!argcheck(internal = optarg, "Ahlm"))
  				usage();
  			break;
  		case 'm':
--- 126,132 ----
  			break;
  		case 'M':
  			ttype = T_MPOOL;
! 			if (!argcheck(stats_internal = optarg, "Ahlm"))
  				usage();
  			break;
  		case 'm':
***************
*** 544,551 ****
  	DB_LOCK_STAT *sp;
  	int ret;
  
! 	if (internal != NULL) {
! 		CDB___lock_dump_region(dbenvp, internal, stdout);
  		return (0);
  	}
  
--- 544,551 ----
  	DB_LOCK_STAT *sp;
  	int ret;
  
! 	if (stats_internal != NULL) {
! 		CDB___lock_dump_region(dbenvp, stats_internal, stdout);
  		return (0);
  	}
  
***************
*** 631,638 ****
  	DB_MPOOL_STAT *gsp;
  	int ret;
  
! 	if (internal != NULL) {
! 		CDB___memp_dump_region(dbenvp, internal, stdout);
  		return (1);
  	}
  
--- 631,638 ----
  	DB_MPOOL_STAT *gsp;
  	int ret;
  
! 	if (stats_internal != NULL) {
! 		CDB___memp_dump_region(dbenvp, stats_internal, stdout);
  		return (1);
  	}
  
diff -c -r ../cvs/htdig/htlib/HtTime.h ./htlib/HtTime.h
*** ../cvs/htdig/htlib/HtTime.h	Sat Feb  2 09:49:33 2002
--- ./htlib/HtTime.h	Wed Jun 18 21:50:53 2003
***************
*** 95,101 ****
  	    }
  	    return(0);
  	}
! 	Progression(double nperiod=.1,char *nlabel="progression")
  	{
  	    label=nlabel;
  	    period=nperiod;
--- 95,101 ----
  	    }
  	    return(0);
  	}
! 	Progression(double nperiod=.1,char *nlabel=(char *)"progression")
  	{
  	    label=nlabel;
  	    period=nperiod;
diff -c -r ../cvs/htdig/htlib/gregex.h ./htlib/gregex.h
*** ../cvs/htdig/htlib/gregex.h	Tue Dec 31 18:59:05 2002
--- ./htlib/gregex.h	Wed Jun 18 23:00:05 2003
***************
*** 527,533 ****
  /* For now unconditionally define __restrict_arr to expand to nothing.
     Ideally we would have a test for the compiler which allows defining
     it to restrict.  */
! #define __restrict_arr
  
  /* POSIX compatibility.  */
  extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
--- 527,535 ----
  /* For now unconditionally define __restrict_arr to expand to nothing.
     Ideally we would have a test for the compiler which allows defining
     it to restrict.  */
! #ifndef  __restrict_arr
! # define __restrict_arr
! #endif
  
  /* POSIX compatibility.  */
  extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
diff -c -r ../cvs/htdig/htlib/htString.h ./htlib/htString.h
*** ../cvs/htdig/htlib/htString.h	Sat Feb  2 09:49:34 2002
--- ./htlib/htString.h	Wed Jun 18 21:50:29 2003
***************
*** 131,137 ****
      inline String	&trunc() { Length = 0; return *this; }
      String		&chop(int n = 1);
      String		&chop(char ch = '\n');
!     String		&chop(const char *str = "\r\n");
  
      //
      // SubStrings
--- 131,137 ----
      inline String	&trunc() { Length = 0; return *this; }
      String		&chop(int n = 1);
      String		&chop(char ch = '\n');
!     String		&chop(const char *str = (char *)"\r\n");
  
      //
      // SubStrings
diff -c -r ../cvs/htdig/htnet/Connection.h ./htnet/Connection.h
*** ../cvs/htdig/htnet/Connection.h	Wed Jun 18 21:46:05 2003
--- ./htnet/Connection.h	Wed Jun 18 21:48:11 2003
***************
*** 66,76 ****
     int Listen(int n = 5);
  
     // IO
!    String* Read_Line(String &, char *terminator = "\n");
!    char* Read_Line(char *buffer, int maxlength, char *terminator = "\n");
!    String* Read_Line(char *terminator = "\n");
     virtual int Read_Char();
!    int Write_Line(char *buffer, char *eol = "\n");
     
     int Write(char *buffer, int maxlength = -1);
     int Read(char *buffer, int maxlength);
--- 66,76 ----
     int Listen(int n = 5);
  
     // IO
!    String* Read_Line(String &, char *terminator = (char *)"\n");
!    char* Read_Line(char *buffer, int maxlength, char *terminator=(char *)"\n");
!    String* Read_Line(char *terminator = (char *)"\n");
     virtual int Read_Char();
!    int Write_Line(char *buffer, char *eol = (char *)"\n");
     
     int Write(char *buffer, int maxlength = -1);
     int Read(char *buffer, int maxlength);
diff -c -r ../cvs/htdig/htnet/Connection.h~ ./htnet/Connection.h~
*** ../cvs/htdig/htnet/Connection.h~	Wed Jun 18 21:44:32 2003
--- ./htnet/Connection.h~	Wed Jun 18 21:46:05 2003
***************
*** 66,76 ****
     int Listen(int n = 5);
  
     // IO
!    String* Read_Line(String &, char *terminator = (char*)"\n");
!    char* Read_Line(char *buffer, int maxlength, char *terminator = (char*)"\n");
!    String* Read_Line(char *terminator = (char*)"\n");
     virtual int Read_Char();
!    int Write_Line(char *buffer, char *eol = (char*)"\n");
     
     int Write(char *buffer, int maxlength = -1);
     int Read(char *buffer, int maxlength);
--- 66,76 ----
     int Listen(int n = 5);
  
     // IO
!    String* Read_Line(String &, char *terminator = "\n");
!    char* Read_Line(char *buffer, int maxlength, char *terminator = "\n");
!    String* Read_Line(char *terminator = "\n");
     virtual int Read_Char();
!    int Write_Line(char *buffer, char *eol = "\n");
     
     int Write(char *buffer, int maxlength = -1);
     int Read(char *buffer, int maxlength);
diff -c -r ../cvs/htdig/htnet/HtCookie.cc ./htnet/HtCookie.cc
*** ../cvs/htdig/htnet/HtCookie.cc	Sat Feb  1 23:59:14 2003
--- ./htnet/HtCookie.cc	Wed Jun 18 22:01:51 2003
***************
*** 465,471 ****
  HtCookie::DateFormat HtCookie::RecognizeDateFormat(const char *datestring)
  {
  
!    register char *s;
  
     if (datestring)
     {
--- 465,471 ----
  HtCookie::DateFormat HtCookie::RecognizeDateFormat(const char *datestring)
  {
  
!    register const char *s;
  
     if (datestring)
     {
diff -c -r ../cvs/htdig/htnet/HtFTP.cc ./htnet/HtFTP.cc
*** ../cvs/htdig/htnet/HtFTP.cc	Fri Aug 30 07:21:34 2002
--- ./htnet/HtFTP.cc	Thu Jun 19 21:07:00 2003
***************
*** 172,178 ****
     if (_modification_time && *_modification_time >= HtDateTime(stat_buf.st_mtime))
       return Transport::Document_not_changed;
  
!    char *ext = strrchr(_url.path(), '.');
     if (ext == NULL)
       return Transport::Document_not_local;
  
--- 172,178 ----
     if (_modification_time && *_modification_time >= HtDateTime(stat_buf.st_mtime))
       return Transport::Document_not_changed;
  
!    const char *ext = strrchr(_url.path(), '.');
     if (ext == NULL)
       return Transport::Document_not_local;
  
diff -c -r ../cvs/htdig/htnet/Transport.cc ./htnet/Transport.cc
*** ../cvs/htdig/htnet/Transport.cc	Wed Jun 18 21:46:07 2003
--- ./htnet/Transport.cc	Wed Jun 18 21:47:21 2003
***************
*** 418,424 ****
  // Recognize the possible date format sent by the server
  Transport::DateFormat Transport::RecognizeDateFormat (const char *datestring)
  {
!    register char *s;
     
     if((s=strchr(datestring, ',')))
     {
--- 418,424 ----
  // Recognize the possible date format sent by the server
  Transport::DateFormat Transport::RecognizeDateFormat (const char *datestring)
  {
!    register const char *s;
     
     if((s=strchr(datestring, ',')))
     {
diff -c -r ../cvs/htdig/htnet/Transport.cc~ ./htnet/Transport.cc~
*** ../cvs/htdig/htnet/Transport.cc~	Wed Jun 18 21:43:09 2003
--- ./htnet/Transport.cc~	Wed Jun 18 21:46:07 2003
***************
*** 418,424 ****
  // Recognize the possible date format sent by the server
  Transport::DateFormat Transport::RecognizeDateFormat (const char *datestring)
  {
!    register const char *s;
     
     if((s=strchr(datestring, ',')))
     {
--- 418,424 ----
  // Recognize the possible date format sent by the server
  Transport::DateFormat Transport::RecognizeDateFormat (const char *datestring)
  {
!    register char *s;
     
     if((s=strchr(datestring, ',')))
     {
diff -c -r ../cvs/htdig/htsearch/ResultMatch.h ./htsearch/ResultMatch.h
*** ../cvs/htdig/htsearch/ResultMatch.h	Sat Feb  2 09:49:35 2002
--- ./htsearch/ResultMatch.h	Thu Jun 19 21:17:07 2003
***************
*** 65,71 ****
  	// The purpose of the derived classes is to define their own.
  	virtual CmpFun getSortFun() = 0;
  
! private:
  	enum SortType
  	{
  	    SortByScore,
--- 65,72 ----
  	// The purpose of the derived classes is to define their own.
  	virtual CmpFun getSortFun() = 0;
  
! 	// Sun's C++ compiler doesn't like private types used in other  structs
! 	// so make this public
  	enum SortType
  	{
  	    SortByScore,
***************
*** 74,79 ****
--- 75,81 ----
  	    SortByID
  	};
  
+ private:
  	double			score;
  	int				anchor;
  	int				id;
diff -c -r ../cvs/htdig/htword/WordBitCompress.h ./htword/WordBitCompress.h
*** ../cvs/htdig/htword/WordBitCompress.h	Mon Dec 30 23:42:59 2002
--- ./htword/WordBitCompress.h	Wed Jun 18 21:52:00 2003
***************
*** 135,141 ****
      }
  
      // get/put an integer using n bits
!     void         put_uint(unsigned int v,int n,const char *tag="NOTAG");
      unsigned int get_uint(               int n,const char *tag=(char*)NULL);
  
      // get/put n bits of data stored in vals
--- 135,141 ----
      }
  
      // get/put an integer using n bits
!     void         put_uint(unsigned int v,int n,const char *tag=(char*)"NOTAG");
      unsigned int get_uint(               int n,const char *tag=(char*)NULL);
  
      // get/put n bits of data stored in vals
***************
*** 219,229 ****
  public:
      int verbose;
      // get/put an integer using a variable number of bits
!     void         put_uint_vl(unsigned int v,int maxn,const char *tag="NOTAG");
      unsigned int get_uint_vl(               int maxn,const char *tag=(char*)NULL);
  
      // get/put an integer checking for an expected value
!     void         put_uint_ex(unsigned int v,unsigned int ex,int maxn,const char *tag="NOTAG")
  	{
  	    if(v==ex){put(1,tag);}
  	    else{put(0,tag);put_uint(v,maxn,(char*)NULL);}
--- 219,229 ----
  public:
      int verbose;
      // get/put an integer using a variable number of bits
!     void         put_uint_vl(unsigned int v,int maxn,const char *tag=(char*)"NOTAG");
      unsigned int get_uint_vl(               int maxn,const char *tag=(char*)NULL);
  
      // get/put an integer checking for an expected value
!     void         put_uint_ex(unsigned int v,unsigned int ex,int maxn,const char *tag=(char*)"NOTAG")
  	{
  	    if(v==ex){put(1,tag);}
  	    else{put(0,tag);put_uint(v,maxn,(char*)NULL);}
***************
*** 237,247 ****
  
      // compress/decompress an array of unsigned ints (choosing best method)
      int put_vals(unsigned int *vals,int n,const char *tag);
!     int get_vals(unsigned int **pres,const char *tag="BADTAG!");
  
      // compress/decompress an array of bytes (very simple)
      int put_fixedbitl(byte *vals,int n,const char *tag);    
!     int get_fixedbitl(byte **pres,const char *tag="BADTAG!");
  
      // compress/decompress an array of unsigned ints (very simple)
      void get_fixedbitl(unsigned int *res,int n);
--- 237,247 ----
  
      // compress/decompress an array of unsigned ints (choosing best method)
      int put_vals(unsigned int *vals,int n,const char *tag);
!     int get_vals(unsigned int **pres,const char *tag=(char*)"BADTAG!");
  
      // compress/decompress an array of bytes (very simple)
      int put_fixedbitl(byte *vals,int n,const char *tag);    
!     int get_fixedbitl(byte **pres,const char *tag=(char*)"BADTAG!");
  
      // compress/decompress an array of unsigned ints (very simple)
      void get_fixedbitl(unsigned int *res,int n);
diff -c -r ../cvs/htdig/htword/WordKey.cc ./htword/WordKey.cc
*** ../cvs/htdig/htword/WordKey.cc	Sat Feb  2 09:49:36 2002
--- ./htword/WordKey.cc	Wed Jun 18 22:21:43 2003
***************
*** 82,88 ****
    const WordKeyInfo& info = *WordKey::Info();
  
    if(a_length < info.num_length || b_length < info.num_length) {
!       fprintf(stderr, "WordKey::Compare: key length for a or b < info.num_length\n");
        return NOTOK;
    }
  
--- 82,88 ----
    const WordKeyInfo& info = *WordKey::Info();
  
    if(a_length < info.num_length || b_length < info.num_length) {
!       fprintf(stderr, "WordKey::Compare: key length %d or %d < info.num_length = %d\n", a_length, b_length, info.num_length);
        return NOTOK;
    }
  
diff -c -r ../cvs/htdig/test/search.cc ./test/search.cc
*** ../cvs/htdig/test/search.cc	Tue May 27 22:51:27 2003
--- ./test/search.cc	Thu Jun 19 21:22:57 2003
***************
*** 1439,1445 ****
    //-
    // Number of valid entries in the <i>cursors</i> member.
    //
!   unsigned int cursors_length;
    //-
    // Permutation generator with proximity toggle
    //
--- 1439,1445 ----
    //-
    // Number of valid entries in the <i>cursors</i> member.
    //
!   int cursors_length;	// (Was unsigned: Sun's C++ wants only  int  subscripts)
    //-
    // Permutation generator with proximity toggle
    //

Reply via email to