List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:March 12 1999 11:24am
Subject:Re: Compiling mysql on HP
View as plain text  
Chris Trown wrote:
> 
>      Hello again.
> 
>      My success at getting mysql Perl modules to compile is 0.  I've tried
> gcc 2.7.2.3, gcc 2.8.1 and egcs 1.1.1.  I've recompiled perl so many times, I
> know the questions by heart.  I can't get it to pass it's tests.  I can't past
> the "Unresolved symbol: __udivdi3" problem.  Monty's suggestion didn't help.
> 
>      Past readers will remember that using HP's CC compiler gets us nowhere.
> Using HP's compiler, it bombs thus:
> 
> CC: "./../include/global.h", line 513: warning: "bool" is a future reserved word
> (215)
> CC: "sql_string.h", line 30: warning: size not used (117)
> CC: "sql_string.h", line 141: sorry, not implemented: cannot expand inline function
> bool String::append(char ) with statement after "return" (2070)
> 
>      Here is the piece of code:
> 
>   inline bool append(char chr)
>   {
>     if (str_length < Alloced_length)
>     {
>       Ptr[str_length++]=chr;
>     }
>     else
>     {
>       if (realloc(str_length+1))
>         return 1;
>       Ptr[str_length++]=chr;
>     }
>     return 0;
>   }
> 
>      I am not a C++ programmer.  Is there any way that this can be rewritten
> to make it more acceptable for the compiler?
> 
>     Anyone, please?
> 
> Chris...

Hi Chris

How about:
  inline bool append(char chr)
  {
    bool result = 0;
    
    if (str_length < Alloced_length)
    {
      Ptr[str_length++]=chr;
    }
    else
    {
      if (realloc(str_length+1))
      {
        result = 1;
      }
      else
      {
        Ptr[str_length++]=chr;
      }
    }
    return result;
  }


I don't have a HP around to test this, but this one should work.

Tschau
Christian

Thread
Compiling mysql on HPChris Trown11 Mar
  • MySQL, No problems !!Mogens Melander12 Mar
  • Re: Compiling mysql on HPChristian Mack12 Mar