Article View: gnu.g++.lib.bug
Article #504Re: installation of libg++-1.34.0 on SUN3/60 SUNOS 3.4
From: Doug Schmidt
Date: Wed, 03 May 1989 22:22
Date: Wed, 03 May 1989 22:22
189 lines
5606 bytes
5606 bytes
[Perhaps we should post this message periodically until libg++ 1.35
comes out!]
In article <2154@valhalla.ee.rochester.edu> kumar@ee.rochester.edu (K.N. Kumar) writes:
++ Hi folks,
++ In my attempt to get g++ and libg++ installed and running on a SUN 3/60(SUNOS3.4)
++ I ran into a couple of hurdles. I have managed to intall g++1.34.2. On trying to
++ install libg++-1.34.0 g++ gave the following error and stopped. Do I need to
++ edit any header files other than files mentioned in README. Any special changes for SUN?
++ Any pointers? Thanks in advance.
++
++ -------------------------------------------------------------------------------
++ message from g++:
++
++ (cd src; make GXX=g++ CC=gcc)
++ g++ -g -O -fchar-charconst -I../g++-include -I.. -fsave-memoized -c Integer.cc
++ ../g++-include/Integer.h:187: friend `even' implicitly overloaded
++ ../g++-include/builtin.h:122: after declaration of non-overloaded `int even (long int)'
++ ../g++-include/Integer.h:188: friend `odd' implicitly overloaded
++ ../g++-include/builtin.h:127: after declaration of non-overloaded `int odd (long int)'
++ *** Error code 1
++
Replace the header file builtin.h with the following. That will fix
your immediate problem.
Doug
----------------------------------------
// This may look like C code, but it is really -*- C++ -*-
/*
Copyright (C) 1988 Free Software Foundation
written by Doug Lea (dl@rocky.oswego.edu)
This file is part of GNU CC.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY. No author or distributor
accepts responsibility to anyone for the consequences of using it
or for whether it serves any particular purpose or works at all,
unless he says so in writing. Refer to the GNU CC General Public
License for full details.
Everyone is granted permission to copy, modify and redistribute
GNU CC, but only under the conditions described in the
GNU CC General Public License. A copy of this license is
supposed to have been given to you along with GNU CC so you
can know your rights and responsibilities. It should be in a
file named COPYING. Among other things, the copyright notice
and this notice must be preserved on all copies.
*/
/*
arithmetic, etc. functions on built in types
*/
#ifndef _builtin_h
#define _builtin_h 1
overload clearbit;
overload dec;
overload gcd;
overload hex;
overload lcm;
overload lg;
overload oct;
overload setbit;
overload sign;
overload sqr;
overload testbit;
overload odd;
overload even;
#include <std.h>
#include <stddef.h>
#include <math.h>
long abs(long);
double abs(double);
void clearbit(long&, long);
void setbit(long&, long);
int testbit(long, long);
int even(long);
long gcd(long, long);
long lg(long);
long lcm(long, long);
int odd(long);
double pow(double, long);
long pow(long, long);
int sign(long);
int sign(double);
long sqr(long);
double sqr(double);
long sqrt(long);
double start_timer();
double return_elapsed_time(double);
char* itoa(long x, int base = 10, int width = 0);
char* hex(long x, int width = 0);
char* oct(long x, int width = 0);
char* dec(long x, int width = 0);
char* form(const char* fmt ...);
unsigned int hashpjw(const char*);
unsigned int multiplicativehash(int);
unsigned int foldhash(double);
extern void default_one_arg_error_handler(const char*);
extern void default_two_arg_error_handler(const char*, const char*);
extern two_arg_error_handler_t lib_error_handler;
extern two_arg_error_handler_t
set_lib_error_handler(two_arg_error_handler_t f);
//#ifdef __OPTIMIZE__
inline double abs(double _arg)
{
return (_arg < 0.0)? -_arg : _arg;
}
inline long abs(long _arg)
{
return (_arg < 0)? -_arg : _arg;
}
inline int sign(long _arg)
{
return (_arg == 0) ? 0 : ( (_arg > 0) ? 1 : -1 );
}
inline int sign(double _arg)
{
return (_arg == 0.0) ? 0 : ( (_arg > 0.0) ? 1 : -1 );
}
inline long sqr(long _arg)
{
return _arg * _arg;
}
inline double sqr(double _arg)
{
return _arg * _arg;
}
inline int even(long _arg)
{
return !(_arg & 1);
}
inline int odd(long _arg)
{
return (_arg & 1);
}
inline long lcm(long _x, long _y)
{
return _x / gcd(_x, _y) * _y;
}
inline void setbit(long& _x, long _b)
{
_x |= (1 << _b);
}
inline void clearbit(long& _x, long _b)
{
_x &= ~(1 << _b);
}
inline int testbit(long _x, long _b)
{
return ((_x & (1 << _b)) != 0);
}
//#endif
#endif
--
On a clear day, under blue skies, there is no need to seek.
And asking about Buddha +------------------------+
Is like proclaiming innocence, | schmidt@ics.uci.edu |
With loot in your pocket. | office: (714) 856-4043 |
Technical Details
Message-ID:
<13215@paris.ics.uci.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!polyslo!usc!orion.cf.uci.edu!uci-ics!zola.ics.uci.edu!schmidtReferences:
<2154@valhalla.ee.rochester.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!polyslo!usc!orion.cf.uci.edu!uci-ics!zola.ics.uci.edu!schmidt From: schmidt@zola.ics.uci.edu (Doug Schmidt) Newsgroups: gnu.g++.lib.bug Subject: Re: installation of libg++-1.34.0 on SUN3/60 SUNOS 3.4 Keywords: libg++-1.34.0, g++-1.34.2 Message-ID: <13215@paris.ics.uci.edu> Date: 3 May 89 22:22:22 GMT References: <2154@valhalla.ee.rochester.edu> Sender: news@paris.ics.uci.edu Reply-To: Doug Schmidt <schmidt@zola.ics.uci.edu> Organization: University of California at Irvine: ICS Dept. Lines: 189