- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help! Wrong /usr/include/stdio.h in HP-UX 11.00
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
Forums
Discussions
Discussions
Discussions
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
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
08-04-2003 01:40 AM
08-04-2003 01:40 AM
/usr/include/stdio.h contains the prototype:
extern int snprintf(char *, __size_t, char *,...);
According to man page the 3rd parameter must be of type "const char *"
C-standard, Solaris, Linux have "const char *".
Because of that bug I can't compile my portable app.
I tried to apply patch PHCO_26111 - with no
fix.
Any help will be appreciated.
Sincerely,
Lev
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 05:42 AM
08-04-2003 05:42 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
http://www2.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_28425&context=hpux:800:11:00
and my 11.00 systems don't have "const char" either, though my 11.11 (11i) systems do. I've haven't heard of any issues from our developers, though they might not be using snprintf.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 06:20 AM
08-04-2003 06:20 AM
Solutiona) it is a bug, 11.11 reflects the man page correctly.
b) I've been unable to find an internal defect ID but suspect no patch is available as yet ... it was reported recently.
c) advise : raise a call with HP support in case there is a more recent update : 3201730260 is a good internal ref to quote.
OR
Correct the stdio.h snprintf definition to add the "const" in front of "char *format" but be aware any C header files patch may return the format filed definition to it's original incorrect state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 06:43 AM
08-04-2003 06:43 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
Are you sure snprintf 11.0 doesn't destroy
char * format ?
Lev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 06:46 AM
08-04-2003 06:46 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
Also since this has made it into 11.11 it would imply it may not get fixed at 11.00.
I presume your application complained of warnings .... or did it actual error ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 08:40 AM
08-04-2003 08:40 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
"Can't convert const char * to char *":
const char fmt = "%d...";
snprintf(buf, size, fmt);
Thanks a lot again!
Lev
P.S. Does hpux 11i provides more
support for wchar?
Does it have swscanf for example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2003 09:06 AM
08-04-2003 09:06 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
Yes, 'swscanf' and 'wconv' provide wide-character support. See the man pages for 'fwscan(3C)', 'fwprintf', 'fwide(3C)' and 'wconv(3C)' for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2003 12:07 AM
08-05-2003 12:07 AM
Re: Help! Wrong /usr/include/stdio.h in HP-UX 11.00
Well, hp-ux 11.0 doesn't have
fwprintf and man fwprintf as well.
Could you please tell me do you have any
statistics what the majority of HP customers
use: 10.xx, 11.00 or 11.i?
Best regards,
Lev