Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jeff DeMaagd <jdemaa17@calvin.edu>
To: axp-list@redhat.com
Subject: Re: Writing portable Code for Glibc and 32/64 bit
Date: Fri, 20 Nov 1998 13:53:46 -0500 (EST)	[thread overview]
Message-ID: <Pine.GSO.4.05.9811201348230.24296-100000@ursa.calvin.edu> (raw)
In-Reply-To: <36558486.13728473@iis.fhg.de>

On Fri, 20 Nov 1998, Stefan Schroepfer wrote:
> I'm not aware of a paper, but the following rules may serve as a
> starting point:
>  - Don't store pointers in ints (it should be safe to use unsigned
>    longs for this purpose, but why not use pointer variables).

Rather goofy that a compiler ever lets that happen.  So much for the goal
of 'easy portability'.  Goofier yet is that people that think themselves
as competent programmers do this.

>  - Don't make assumptions on the size of data types, always use
>    the sizeof () operator.

Oh, that's why it's in the language! :)

>  - Avoid assembly language.

I don't mind assembly language, just make sure there are IFNDEF's for
general purpose code too.  Makes maintainance a bit harder, but sometimes
raw performance matters. :)
 
> > for a friend that has to implement transparent network cryptography for
> > Linux soon: Where can I find documents that tell him how to code
> > good, portable code for glibc and 32/64 bit Linux? It there a quick
> > introductory paper to the most important things to remember and a longer
> > one explaning what to do and what not?

JRDM


  reply	other threads:[~1998-11-20 18:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-20 11:03 Writing portable Code for Glibc and 32/64 bit y0000218
1998-11-20 15:02 ` Stefan Schroepfer
1998-11-20 18:53   ` Jeff DeMaagd [this message]
1998-11-21 13:18     ` Dave Gilbert
  -- strict thread matches above, loose matches on Subject: below --
1998-11-21 20:12 Greg Lindahl
1998-11-21 20:40 ` Dave Gilbert
1998-11-21 20:47   ` Maciej W. Rozycki
1998-11-21 20:51 Greg Lindahl
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox