[csw-maintainers] RFC: idea to unify 32/64 bit headers

Igor Galić i.galic at brainsware.org
Thu Sep 8 07:39:17 CEST 2011



----- Original Message -----
> No dia 23 de Agosto de 2010 20:49, Dagobert Michelsen
> <dam at opencsw.org> escreveu:
> > If you do
> >  diff -D __amd64 curlbuild-32.h curlbuild-64.h
> > It will generate an include file where the differences only in the
> > second
> > file will be shielded by C preprocessor ifdefs with the string
> > after the -D.
> > I like this that much that I am really thinking of making this
> > fully
> > automatic: On merge GAR currently just copies over the default (32
> > bit)
> > modulation. I could just merge over the diff'ed 32/64 between the
> > default 32 bit ISA and 64 bit ISA easily making these special
> > things
> > obsolete.
> >
> > Thoughts?

Two thoughts: +1
And: Which headers are currently included?

> I'm definitely for it.  Our libgmp build can serve as a testbed.  I'd
> be also willing to write some code to facilitate this.  How would you
> envision the implementation, Dago?

I just tried this out in the shell..

igalic at unstable10x ...ar/pkg/hwloc/trunk/work/solaris9-i386 % for f in $( find install-isa-i386/opt/csw/include/ -type f ) ; do
x86="${f}"
amd64="${f/install-isa-i386/install-isa-amd64}"
diff -D __amd64 "${x86}" "${amd64}"
done

And found some rather disturbing things

/* Defined to 1 if you have the <stdint.h> header file. */
#ifndef __amd64
/* #  undef HWLOC_HAVE_STDINT_H */
#else /* __amd64 */
#  define HWLOC_HAVE_STDINT_H 1
#endif /* __amd64 */


> Maciej

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic at brainsware.org
URL: http://brainsware.org/
GPG: 571B 8B8A FC97 266D BDA3  EF6F 43AD 80A4 5779 3257


More information about the maintainers mailing list