- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Function Open bug C
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
10-29-2001 12:06 AM
10-29-2001 12:06 AM
Function Open bug C
I don't understand why the function open in languge C on Hp 10.20 serie 700 don't function.
void main()
{
int fd;
fd = open("file", O_RDONLY);
close(fd);
}
And whith goods includes.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 01:35 AM
10-29-2001 01:35 AM
Re: Function Open bug C
Add the following after your call to open()
----
if (fd < 0)
printf ("open failed with errno %d\n", errno);
----
and do a finderr on the error number.
remeber to #include

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 03:13 AM
10-29-2001 03:13 AM
Re: Function Open bug C
cc: "File", line 7 / error 1588 : "O_RDONLY" undenied
yet this function function with other OS like IBM and I include good
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 05:12 AM
10-29-2001 05:12 AM
Re: Function Open bug C
I hope this doesn't compile. You obviously don't have
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 05:23 AM
10-29-2001 05:23 AM
Re: Function Open bug C
Compile now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 11:34 PM
10-29-2001 11:34 PM
Re: Function Open bug C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 01:19 AM
10-30-2001 01:19 AM
Re: Function Open bug C
What does "grep O_RDONLY /usr/include/sys/fcntl.h" yield?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 01:33 AM
10-30-2001 01:33 AM
Re: Function Open bug C
define O_RDONLY 000000 /*open for reading only*/
But if I replace O_RDWR the function open don't function. I think it's a bug and I want a patche please.
thanks everybody.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 01:59 AM
10-30-2001 01:59 AM
Re: Function Open bug C
/usr/include/fcntl must
#include
Try swverify for ansiC package.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 02:10 AM
10-30-2001 02:10 AM
Re: Function Open bug C
Remove the #include
Quick & dirty, but it'll work for the small test program that you have. (I hope my boss doesnt see this!)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 04:12 AM
10-30-2001 04:12 AM
Re: Function Open bug C
thank everybody.
if you find the solution, please mail to:
eric.bocquel@sextant.thomson-csf.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2001 03:08 PM
10-30-2001 03:08 PM
Re: Function Open bug C
#include
#include
main()
{
int pp;
pp=open("/tmp/pp.c",0_RDONLY);
close (pp);
}
UES90201:/tmp#cc pp.c -o pp
cc: "pp.c", line 8: error 1000: Unexpected symbol: "_RDONLY".
Now:
#include
#include
main()
{
int pp;
pp=open("/tmp/pp.c",O_RDONLY);
close (pp);
}
UES90201:/tmp#cc pp.c -o pp
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (pp.o) was detected. The linked output may not run on a PA 1.x system.
DIFFERENCE:
0_RDONLY (zero_RDONLY) and O_RDONLY
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2001 12:32 AM
10-31-2001 12:32 AM
Re: Function Open bug C
Gross,
This maybe flogging a dead horse, but is it possible that you dont have or cant access /usr/include/fcntl.h?
Try
#include
instead of
#include
