[GRASS5] compilation HP-UX

Robert Lagacé lagace at grr.ulaval.ca
Wed Jun 13 19:13:48 EDT 2001


"Eric G. Miller" wrote:
> 
> On Wed, May 30, 2001 at 06:35:06PM -0400, Robert Lagacé wrote:
> >
> > I cimpiled succesfully GRASS on HP-UX except a few modules that I will
> > talk about later on.
> [snip]
> > - d.area with the following message
> >
> > >>>>
> >       gcc -g -O2  -I/opt/libpng/include -I/local/grass5.0.0pre1/src/include
> >              -c plot.c -o OBJ.hppa1.1-hp-hpux10.20/plot.o
> > In file included from plot.c:18:
> > screenpoly.h:39: warning: redefinition of `uint8_t'
> > /usr/include/sys/_inttypes.h:62: warning: `uint8_t' previously declared here
> > screenpoly.h:42: conflicting types for `uint32_t'
> > /usr/include/sys/_inttypes.h:66: previous declaration of `uint32_t'
> > *** Erreur - code de sortie 1
> 
> Dang, I tried to guard for that. "screenpoly.h" is the last include for
> plot.c and has...
> 
> #if !defined(uint8_t)
>   typedef unsigned char uint8_t;
> #endif
> #if !defined(uint32_t)
>   typedef unsigned long uint32_t;
> #endif
> 
> But maybe those aren't working?  d.area is fairly broken anyway -- Anyone else
> want to take a crack at it?
> 
> --
> Eric G. Miller <egm2 at jps.net>
> _______________________________________________
> grass5 mailing list
> grass5 at geog.uni-hannover.de
> http://www.geog.uni-hannover.de/mailman/listinfo/grass5

I successfully compile d.area with the following change in in screenpoly.h
(wrapping the #if !defined code)  

#ifndef __INTTYPES_INCLUDED

#if !defined(uint8_t)
  typedef unsigned char uint8_t;
#endif
#if !defined(uint32_t)
  typedef unsigned long uint32_t;
#endif

#endif

---------------

uint8_t and uint32_t are defined in /usr/include/sys/_inttypes.h where they 
are defined under __INTTYPES_INCLUDED the following way

typedef unsigned char uint8_t; 		/* 8-bit unsigned integer */ 
typedef unsigned int uint32_t;		/* 32-bit unsigned integer */

So as uint32_t should be defined typedef unsigned int uint32_t as suggested.

I do not know by which include file _inttypes.h is pick up.

This solution may work on other systems.

----------------------------

d.area run displaying areas and borders but without area or perimeter
information. 
But the module v.area do that.
 
-- 
Robert Lagacé, professeur
Pavillon Comtois
Université Laval
Ste-Foy, Québec, G1K 7P4
tel : (418)-656-2131#2276
Fax : (418)-656-3723
E-mail : lagace at grr.ulaval.ca



More information about the grass-dev mailing list