From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20521 invoked from network); 20 Nov 1998 15:01:44 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 20 Nov 1998 15:01:44 -0000 Received: from mailgw2.fhg.de (fhg.de [153.96.1.1]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id KAA11120 for ; Fri, 20 Nov 1998 10:01:42 -0500 Received: by mailgw2.fhg.de (fhg.de); Fri, 20 Nov 1998 16:01:31 +0100 (MET) X-ENV: (mailgw2.fhg.de) scr@iis.fhg.de -> axp-list@redhat.com.VIA-SMTP X-BULK-CHECK-2-981120.15.59.14: root@iis.iis.fhg.de [153.96.172.2] Received: by mailgw2.fhg.de (fhg.de) with ESMTP; Fri, 20 Nov 1998 15:57:45 +0100 (MET) from iis.fhg.de Received: by iis.fhg.de with SMTP; Fri, 20 Nov 1998 15:57:44 +0100 (MET) from sunserv02.iis.fhg.de Received: from ew003 by sunserv02.iis.fhg.de (SMI-8.6/SMI-SVR4) id PAA26269; Fri, 20 Nov 1998 15:57:43 +0100 Sender: scr@iis.fhg.de Message-ID: <36558486.13728473@iis.fhg.de> Date: Fri, 20 Nov 1998 16:02:31 +0100 From: Stefan Schroepfer Organization: FHG-IIS X-Mailer: Mozilla 3.0 (X11; I; SunOS 4.1.3_U1 sun4m) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: Writing portable Code for Glibc and 32/64 bit References: <199811201103.LAA13832@ppp393.ts.rz.tu-bs.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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). - Don't make assumptions on the size of data types, always use the sizeof () operator. - Avoid assembly language. scr y0000218@rzsrv2.rz.tu-bs.de wrote: > > 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?