- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- strtok_r 64 BIT HP unix
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО02-23-2004 10:28 PM
тАО02-23-2004 10:28 PM
strtok_r 64 BIT HP unix
When compiled in 64 Bit it gives warning.
and on usage it gives core dump.
Have any one faced similar problem ,thought confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 10:32 PM
тАО02-23-2004 10:32 PM
Re: strtok_r 64 BIT HP unix
http://hpux.connect.org.uk/hppd/hpux/Development/Tools/TS-1.08/
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 10:46 PM
тАО02-23-2004 10:46 PM
Re: strtok_r 64 BIT HP unix
Weird! I'll keep playing with that!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 10:52 PM
тАО02-23-2004 10:52 PM
Re: strtok_r 64 BIT HP unix
Maybe you are doing the same thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:14 PM
тАО02-23-2004 11:14 PM
Re: strtok_r 64 BIT HP unix
#include
#include
#include
void main(){
char usr[36];
char *name[5];
char *arr=NULL;
memset(usr,'\0',sizeof(usr));
strcpy(usr,"ab cd ef");
name[0]=(char *)strtok_r(usr," ",&arr);
printf("arr is %s\n",arr);
printf("name is %s\n",name[0]);
return ;
}
[node:/tmp]
Compilation Trace:
cc +DD64 -g -o t1 t1.c
cc: 487: warning : Possibly incorrect message catalog.
cc: "t1.c", 10: 724: , line : warning Cast: converts default int return type to pointer.
The same Code goes without warning in 32 bit compilation mode but aborts in 64 bit.
I am unable to track why this warning is produced in 64 BIT compilation
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:28 PM
тАО02-23-2004 11:28 PM
Re: strtok_r 64 BIT HP unix
What compiler are you using? I'm just using the default compiler that comes with a standard HPUX install. I just compiled it fine using gcc though that was on Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:41 PM
тАО02-23-2004 11:41 PM
Re: strtok_r 64 BIT HP unix
ccom: HP92453-01 B.11.11.28212.GP HP C Compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:42 PM
тАО02-23-2004 11:42 PM
Re: strtok_r 64 BIT HP unix
cpp.ansi: HP92453-01 B.11.11.06 HP C Preprocessor (ANSI)
ccom: HP92453-01 B.11.11.28212.GP HP C Compiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:50 PM
тАО02-23-2004 11:50 PM
Re: strtok_r 64 BIT HP unix
If you are running this on a 64 bit machine, try compiling it with no options i.e just "-o"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:55 PM
тАО02-23-2004 11:55 PM
Re: strtok_r 64 BIT HP unix
>>
cc: "t1.c", 10: 724: , line : warning Cast: converts default int return type to pointer.
<<
Undoubtly you use the function that is not previously declared to the compiler. It should work even without casting.
try:
cc +DD64 -g -o t1 -D_REENTRANT t1.c
Good luck
Adam