HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Porting to 64 Bit
Operating System - HP-UX
1834454
Members
2948
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2003 09:06 AM
11-14-2003 09:06 AM
Porting to 64 Bit
Hi
We are migrating a 32 Bit C program to 64 Bit on HPUX 11i.
In our C App We are using some functions like
char * GetCFGValue(char & line)
{
char * pszStart = 0;
if ((pszStart = (char *)strchr(pszLine,
(int)'[')) != 0)
pszStart++;
return(pszStart);
}
We get a warning with the M1 Compiler options..
warning 724: Cast converts default int return type to pointer.
And our app crashes on runtime..
Appreciate your thoughts..
Thanks..
We are migrating a 32 Bit C program to 64 Bit on HPUX 11i.
In our C App We are using some functions like
char * GetCFGValue(char & line)
{
char * pszStart = 0;
if ((pszStart = (char *)strchr(pszLine,
(int)'[')) != 0)
pszStart++;
return(pszStart);
}
We get a warning with the M1 Compiler options..
warning 724: Cast converts default int return type to pointer.
And our app crashes on runtime..
Appreciate your thoughts..
Thanks..
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2003 10:59 AM
11-14-2003 10:59 AM
Re: Porting to 64 Bit
If I had to guess, I would say that you are not including the proper include files, and at some point someone kludged the code with that (char *) in front of the strchr to "fix" it.
It would have "worked" in 32 bit (aka ILP32) because an int (what C assumes a function returns unless told otherwise by a declaration) was the same size as a pointer. When you go 64-bit, you are in an "LP64" model where only longs and pointers are 64-bit, and ints remain 32-bit.
If you do a "man strchr" you can see the discussion of the include files for strchr. Then you should be able to get rid of that "char *) cast in front of strchr.
Or I could be barking up the wrong tree.
It would have "worked" in 32 bit (aka ILP32) because an int (what C assumes a function returns unless told otherwise by a declaration) was the same size as a pointer. When you go 64-bit, you are in an "LP64" model where only longs and pointers are 64-bit, and ints remain 32-bit.
If you do a "man strchr" you can see the discussion of the include files for strchr. Then you should be able to get rid of that "char *) cast in front of strchr.
Or I could be barking up the wrong tree.
there is no rest for the wicked yet the virtuous have no pillows
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP