Moving to AMD64 bit and porting issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have been going down the 64-bit only path for building C/C++
applications.  Of course, I have been running into portability issues
when converting older 32-bit apps to build/run on a 64-bit OS.

Specifically in my case; I am using an AMD64 running RedHat Enterprise
Linux WS Release 4 update 2 (RHEL4 WS up2).  So, the version of GCC
follows:
==========================================================================
[williams@sns-hp-eval1 medm]$ gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
===========================================================================

When I compile an old 32-bit app, the build works but at run-time it
crashes and burns.  Well, it has to do with using "NULL" versus "0"
Now here is a portability question:

Should we use "NULL" to represent a null pointer or "0" to represent a
null pointer?


When I replace "0" with NULL in the code the crash no longer occurred.


What else can I expect when moving 32-bit apps to the 64-bit platform.






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux