- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: vsnprintf in HP-UX
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
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
тАО11-02-2004 10:33 PM
тАО11-02-2004 10:33 PM
vsnprintf in HP-UX
I understand that vsnprintf function in HP-UX is broken.
I have some code which uses vsnprintf function and running on HP. Is there any alternative to these functions?
Is there any solution/ workaroud for this issue?
thanks and regards
vuz
- Tags:
- vsnprintf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2004 05:25 AM
тАО11-03-2004 05:25 AM
Re: vsnprintf in HP-UX
broken on your machine perhaps you ought
to be looking for patches relating to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2004 04:28 PM
тАО11-03-2004 04:28 PM
Re: vsnprintf in HP-UX
My environment is HP-UX 11i.
uname -a gives me
HP-UX jesser01 B.11.11 U 9000/800 2640277115 unlimited-user license
Here I see that the vsnprintf is giving me some errors. could I know what are the patches I need to apply for vsnprintf to work???
Background information: I am porting an application running on Solaris to HP-UX and in this code the vsnprintf is giving me errors.
Thanks and regards
vuz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2004 05:44 AM
тАО11-04-2004 05:44 AM
Re: vsnprintf in HP-UX
what you think your problem is. When you
say "errors" do you mean compile-time errors
or run-time errors? What does vsnprintf
do (or not do) that you think it shouldn't
(or should)?
As for patches, go look up "vsnprintf"
or "stdarg" in the patch database.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2004 06:19 AM
тАО11-25-2004 06:19 AM
Re: vsnprintf in HP-UX
Thank you for your support.
I had run a program as below. Here, while running on my platform I always get the value of len < 0 and it signals an error.
static int
set_env(const char *format, ...)
{
va_list ap;
char dummy_buf[64];
int istat, len;
char *ptr;
/*
* Init the va_list
*/
va_start(ap, format);
len = vsnprintf(dummy_buf, sizeof(dummy_buf)-1, format, ap);
if (len <= 0)
{
va_end(ap);
return((len < 0) ? -1 : 0);
}
/*
.
.
.
.
.
.
.
}
Why is this so?
Your comments on this snippet shall be appreciated.
Thanks and regards
vineesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2004 12:34 PM
тАО11-25-2004 12:34 PM
Re: vsnprintf in HP-UX
len = vsnprintf(dummy_buf, sizeof(dummy_buf)-1, format, ap);
should read
len = vsnprintf(dummy_buf, sizeof(dummy_buf), format, ap);
You will get len < 0 when you overflow dummy_buf.