From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11580 invoked from network); 22 Jun 1998 15:34:25 -0000 Received: from rnaworld.princeton.edu (128.112.113.124) by mail2.redhat.com with SMTP; 22 Jun 1998 15:34:25 -0000 Received: from localhost (tim@localhost) by rnaworld.princeton.edu (8.8.7/8.8.7) with SMTP id LAA05030 for ; Mon, 22 Jun 1998 11:36:05 -0400 Date: Mon, 22 Jun 1998 11:36:05 -0400 (EDT) From: Tim Jenkins To: axp-list@redhat.com Subject: Making programs 64 bit clean Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I have several programs which cast pointers to ints, which I am hoping to clean up. It appears that if I redefine the integer variables as longs and then cast the pointers to longs, I am converting a 64 bit pointer to a 64 bit long, rather than a 64 bit pointer to a 32 bit int. e.g. Unacceptable: int foo; int *bar; foo = (int) bar; Acceptable?: long foo; int *bar; foo = (long) bar; Is this an acceptable solution to making programs 64 bit clean and is it portable across 32 bit and 64 bit platforms? thanks, tim