Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* 32-bit Applications on Tru64
@ 2000-06-09  4:00 flickering_doom
  2000-06-13  4:00 ` Jeff Sullivan
  2000-06-15  4:00 ` Jeff Donsbach
  0 siblings, 2 replies; 4+ messages in thread
From: flickering_doom @ 2000-06-09  4:00 UTC (permalink / raw)


My employer has years and years of development invested in Windows 9x,
Windows NT, and a few *nix platforms. Now he is under pressure to move some
of the apps to Tru64. The problem is that most of the code is not ready for
64-bit yet (pointers are cast to int and back again).

I have read the compiler documentation, and know all about the -xtaso and
-xtaso_short flags and the pointer_size pragma. But is there any way to build
and run 32-bit software on Tru64 until we have time to port the code
correctly?



Sent via Deja.com http://www.deja.com/
Before you buy.



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

* Re: 32-bit Applications on Tru64
  2000-06-09  4:00 32-bit Applications on Tru64 flickering_doom
@ 2000-06-13  4:00 ` Jeff Sullivan
  2000-06-13  4:00   ` Jeff Sullivan
  2000-06-15  4:00 ` Jeff Donsbach
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Sullivan @ 2000-06-13  4:00 UTC (permalink / raw)


If you're running UNIX V4.0D or later, you should look
at man protect_headers_setup(8). This script will "protect"
the system header files (and 64-bit interfaces) from the 
flags that alter the pointer size (such as -xtaso_short).

There are also some online docs that you can read:

http://www.tru64unix.compaq.com/faqs/publications/pub_page/doc_list.html

You may want to check out the Programmer's Guide. Below is the
(long) URL to the one for UNIX V5.0A, for example:

http://www.tru64unix.compaq.com/faqs/publications/base_doc/DOCUMENTATION/V50A_HTML/ARH9VBTE/TITLE.HTM

Appendix A describes "Using 32-Bit Pointers on Tru64 UNIX
Systems"

As you noted, the best alternative is to clean up the code
so that you don't need to use these workarounds.

Hope it helps.

-Jeff



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

* Re: 32-bit Applications on Tru64
  2000-06-13  4:00 ` Jeff Sullivan
@ 2000-06-13  4:00   ` Jeff Sullivan
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Sullivan @ 2000-06-13  4:00 UTC (permalink / raw)


I should also mention that the latest Compaq C compiler
in the Developer's Toolkit Supplement adds some useful
diagnostics that will help you port the code.

The compiler is available for download at:

  http://www.tru64unix.compaq.com/dtk/

The compiler can be installed on Tru64 UNIX Version 4.0D,
4.0F, 4.0G, 5.0, and 5.0A. It does not require an
additional license, if you already have an active
software development (OSF_DEV) license.

You'll want the latest Field Test kit (available 6/9/00)
In the man page, you can read about how to turn on (or
off) some of the additional diagnostics.

For example, you could add "-msg_enable level[n]" or
"-msg_enable 64bit". You can use -msg_disable to quiet
any of the warnings that are not of interest. If you
don't want to change Makefiles, I suggest you use the
DEC_CC environment variable (or comp.config file).
See man cc(1) for details.

Hope it helps.

-Jeff



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

* Re: 32-bit Applications on Tru64
  2000-06-09  4:00 32-bit Applications on Tru64 flickering_doom
  2000-06-13  4:00 ` Jeff Sullivan
@ 2000-06-15  4:00 ` Jeff Donsbach
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Donsbach @ 2000-06-15  4:00 UTC (permalink / raw)


You can probably "get by" with just using the linker's "-taso" option. This
restricts addresses returned by system calls to the lower 31 bits. If you
cast a pointer to an int and then back again, things should be ok as it will
have just chopped off 0's in the high order bytes. It's not pretty, but it
works. In your code, pointers should still be allocated as 8 byte quantities
however. A "long" is always 8 bytes, no matter what. There are no options to
change their size.

In my experience, using the -xtaso and -xtaso_short compiler options and
#pragma pointer_size are usually more trouble than it is worth. I steer
clear of them.

Jeff Sullivan gave some good suggestions on using the latest compiler and
it's diagnostics to clean up all your 64 bit issues. You can also use the
Porting Assistant as well as "lint" and some of it's options like "-Q".

Regards,
Jeff Donsbach



<flickering_doom@my-deja.com> wrote in message
news:8hr7h1$2gg$1@nnrp2.deja.com...
> My employer has years and years of development invested in Windows 9x,
> Windows NT, and a few *nix platforms. Now he is under pressure to move
some
> of the apps to Tru64. The problem is that most of the code is not ready
for
> 64-bit yet (pointers are cast to int and back again).
>
> I have read the compiler documentation, and know all about the -xtaso and
> -xtaso_short flags and the pointer_size pragma. But is there any way to
build
> and run 32-bit software on Tru64 until we have time to port the code
> correctly?
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.




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

end of thread, other threads:[~2000-06-15  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-09  4:00 32-bit Applications on Tru64 flickering_doom
2000-06-13  4:00 ` Jeff Sullivan
2000-06-13  4:00   ` Jeff Sullivan
2000-06-15  4:00 ` Jeff Donsbach

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