Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Making programs 64 bit clean
@ 1998-06-22 17:35 Greg Lindahl
  1998-06-22 19:32 ` Michal Jaegermann
  1998-06-22 19:53 ` Making programs 64 bit clean Richard Hadsell
  0 siblings, 2 replies; 42+ messages in thread
From: Greg Lindahl @ 1998-06-22 17:35 UTC (permalink / raw)
  To: axp-list

> 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? 

This is the easiest way to fix broken code. However, it isn't
necessarily portable to other 64 bit machines -- I think everyone
else (?) defines long == 32 bits and long long == 64 bits.

Your best bet for a clean, easy solution is to typedef an int64 type
and use that, with an appropriate definition for each machine. If you
are clever you can put that into a configure script...

It's much better in the long run to fix the programs to not cast
pointers to ints of any width, but of course that is much more
expensive than this quick hack.

-- g





^ permalink raw reply	[flat|nested] 42+ messages in thread
* Re: The new X
@ 1998-06-24 17:26 Paul Tomblin
  0 siblings, 0 replies; 42+ messages in thread
From: Paul Tomblin @ 1998-06-24 17:26 UTC (permalink / raw)
  To: axp-list

Sorry if you see this twice.  One of my telnet windows to my home machine is
acting funny so I'm not sure if this got out before it started acting up.

Quoting Wes Bauske (wsb@paralleldata.com):
> Come to think of it, when I run Netscape and XV on the same screen
> in 8 bit mode, things still don't flash. Who ever starts last just
> doesn't get many colors. Are you all saying GIMP flashes?? That's
> GIMP's problem then...

That's what I've been saying.  There are plenty of "good" compromises to using
colors in X which I don't believe are there in Windows.  Microsoft products
generally take a "our way, or the highway" approach while X gives the
programmers more leeway to do the right thing or to hang themselves.
Unfortunately, most programmers take the easy way out and end up with stuff
that works fine on their machines, but not on the low-end.


--
Paul Tomblin, ptomblin@xcski.com.
"It's just a cardboard model.  Fake security"
"Jeez, that's a first for Microsoft"
   - User Friendly


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~1998-06-24 18:03 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-22 17:35 Making programs 64 bit clean Greg Lindahl
1998-06-22 19:32 ` Michal Jaegermann
1998-06-22 20:47   ` Christopher Curtis
1998-06-22 21:49     ` Michal Jaegermann
1998-06-22 21:50     ` Paul Tomblin
1998-06-22 22:24       ` Jeff Sturm
1998-06-22 22:58       ` The new X (was Re: Making programs 64 bit clean) Christopher Curtis
1998-06-22 23:52         ` Paul Tomblin
1998-06-23  0:54           ` Christopher Curtis
1998-06-23  1:31             ` Bryan W. Headley
1998-06-23  2:33             ` cbbrowne
1998-06-23  2:54             ` Paul Tomblin
1998-06-23  3:42               ` mgraffam
1998-06-23 15:26                 ` The new X [long!] Christopher Curtis
1998-06-23 17:46                   ` mgraffam
1998-06-24  1:59                     ` cbbrowne
1998-06-23 18:33                   ` Paul Tomblin
1998-06-23 20:30                     ` mgraffam
1998-06-23 23:57                       ` Paul Tomblin
1998-06-24  2:14                         ` mgraffam
1998-06-24  2:06                     ` Christopher Curtis
1998-06-23 15:47             ` The new X (was Re: Making programs 64 bit clean) Jeff Sturm
1998-06-23 16:10               ` Christopher Curtis
1998-06-23 17:01                 ` Jeff Sturm
1998-06-23 19:47                   ` pjlahaie
1998-06-23 18:25                 ` William Bradford
1998-06-24  2:28                   ` several messages Christopher Curtis
1998-06-23 18:42                 ` The new X (was Re: Making programs 64 bit clean) Paul Tomblin
1998-06-23 21:03                 ` The new X Wes Bauske
1998-06-24  0:07                   ` Paul Tomblin
1998-06-24  3:44                     ` [OFFTOPIC] " Stephen Williams
1998-06-24 16:02                     ` Wes Bauske
1998-06-24 18:01                       ` Christopher Curtis
1998-06-24 13:59                   ` Jeff Sturm
1998-06-23  0:18         ` The new X (was Re: Making programs 64 bit clean) Pablo A. Godel
1998-06-23  2:28           ` Paul Tomblin
1998-06-23  8:39           ` Joakim Roubert
1998-06-23 15:30         ` OFFTOPIC: " Jeff Sturm
1998-06-24  1:31           ` Christopher Curtis
1998-06-24 14:52             ` Jeff Sturm
1998-06-22 19:53 ` Making programs 64 bit clean Richard Hadsell
  -- strict thread matches above, loose matches on Subject: below --
1998-06-24 17:26 The new X Paul Tomblin

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