open() and fopen()

A

Ancient_Hacker

Eric said:
<off-topic>

That's odd: The power to declare war rests with the
Congress, not with the President. (According to Article I,
Section 8 of a document nobody pays attention to any more.)

</off-topic>

Sorry, I heard that on the radio yesterday and didnt think thru the
impossibility of that.

To be more precise: I think Truman was the last president that
intended to ask Congress for a declaration of war-- but first he
conferred with congressional leaders and they opined it would take a
long time to get a declaration passed, but most of congress was in
favor. So the prez went ahead and committed US troops to that UN
"police action".

I don't think Kennedy, Johnson, Nixon, Bush#1, Bush#2 any of them
intended to ask for a declaration of war. Congress can of course to a
considerable extent control the long-term intensity of the war by
allocating funds accordingly.

All horribly off-topic.
 
W

Walter Roberson

Okay, I understand now. It remains correct to say that open() is a
POSIX function. But, indeed, on non-POSIX platforms, the name is of
course available for other things. Given the context, I'm pretty sure
that POSIX was relevant, and that I pointed Jack to the right newsgroup.
I apologize to the ~0.01% of possible Jacks who may have asked that
question without using a POSIX or POSIX-ish system.

Far far more than ~0.01%. Windows NT and XP are not POSIX,
and to get POSIX with them, you have to use special tools and
special link libraries... and even then on XP the resulting binary
needs XP Professional because XP Home Edition does not have the
requires subsystem.
 
C

Chris Smith

Walter Roberson wrote...
Far far more than ~0.01%. Windows NT and XP are not POSIX,
and to get POSIX with them, you have to use special tools and
special link libraries... and even then on XP the resulting binary
needs XP Professional because XP Home Edition does not have the
requires subsystem.

And you think it's equally likely that developers on Win32 platforms
will show up on newsgroups asking about the difference between open()
and fopen()? If so, then you are either lying or insane. If not, then
please lay off the phony nonsense. I merely pointed out that it's
practically certain that Jack is looking for a POSIX function, and
pointed him to the right newsgroup to ask about it. There's something
seriously wrong here when that gets this kind of reaction.
 
W

Walter Roberson

Walter Roberson wrote...
And you think it's equally likely that developers on Win32 platforms
will show up on newsgroups asking about the difference between open()
and fopen()?

No, I think it *more* likely that Win32 developers would do so.
Unix (and Linux) developers, in *my* experience, -tend- more towards
"try to help yourself first and ask about the confusion if necessary".

If so, then you are either lying or insane. If not, then
please lay off the phony nonsense. I merely pointed out that it's
practically certain that Jack is looking for a POSIX function, and
pointed him to the right newsgroup to ask about it. There's something
seriously wrong here when that gets this kind of reaction.

It is my -belief- that the probability that the OP is using Windows
is at least 40%. That is, to my mind, a sufficiently high probability
that your unqualified reference to POSIX deserved a comment.

If you believe that I am lying, if you believe that I don't
*really* believe the OP might well be using Windows, then I
cannot think at the moment of any way to convince you of the
sincerity of my belief. You could examine large numbers of my
postings and assess whether I'm in the habit of making deliberate
mistatements of truth (okay, so the Flaming Lapdogs posting was
deliberate humour).

If you believe that I am insane, then do you have the medical
credentials to make that assessment? Is there some fact that
I am deliberately or subconciously ignoring? Or are you
merely making a -judgement- of the OP's intention based upon your
assessment of relative -probabilities- -- an assessment that I,
having very likely witnessed a different assortment of postings,
might have come to a conclusion on?

Saying that someone is either "lying or insane" is rather strong
wording, and you should not so post unless you have strong evidence
to support your phrasing. People may be mistaken; people may
not be in full possession of the facts; people may have come to
different conclusions than you would have given the same facts;
people may overlook important details for lack of time, or
due to distraction, or because they do not have the experience or
skills to interpret those facts. But to call someone you barely
know, "lying or insane" is disappointing.
 
F

Flash Gordon

Walter said:
No, I think it *more* likely that Win32 developers would do so.
Unix (and Linux) developers, in *my* experience, -tend- more towards
"try to help yourself first and ask about the confusion if necessary".

<snip>

In support of Walter, at least some development systems I've used on
Win32 systems *do* have an open function (this is not counting Cygwin).
Whether said open function conforms to the POSIX specification is
another matter.
 
R

Richard Heathfield

Walter Roberson said:
Chris Smith <[email protected]> wrote:

It is my -belief- that the probability that the OP is using Windows
is at least 40%.

According to his headers, the OP is using Windows for his news access, at
least. Furthermore, ***he had to ask the question***, which is another
strong hint that he's using Windows.

<snip>
 
M

Michael Wojcik

Walter Roberson wrote...

The Windows console subsystem includes an open() library function
(which does not conform to the current POSIX standard; for example,
it does not support O_NOCTTY). See io.h in the Microsoft SDK. The
POSIX subsystem is not required.
And you think it's equally likely that developers on Win32 platforms
will show up on newsgroups asking about the difference between open()
and fopen()?

Since both of those exist on Win32, that seems entirely plausible.
If so, then you are either lying or insane.

Or perhaps simply more knowledgeable than you. That doesn't seem to
be much more difficult than being more courteous.
I merely pointed out that it's
practically certain that Jack is looking for a POSIX function,

It's easy to be certain when you don't know what you're talking about,
true.
There's something
seriously wrong here when that gets this kind of reaction.

There's something wrong here, all right, but it's not Walter or
comp.lang.c.
 
M

Michael Wojcik

In support of Walter, at least some development systems I've used on
Win32 systems *do* have an open function (this is not counting Cygwin).

Such as, for example, all of the ones supplied by Microsoft. In the
SDK, it's prototyped in io.h (only if extensions are enabled, ie
__STD_C__ is not defined).

The Microsoft C implementations actually generate the symbol _open,
or __imp__open, for the function, depending on the linking mode.
Note, though, that "open" is not simply a macro - it's in the regular
identifier namespace, and behaves as a function wrt sequence points,
etc. (All of this is easily demonstrated by generating preprocessed
output and other intermediate output forms.)
Whether said open function conforms to the POSIX specification is
another matter.

It does not.

Really, determining all of this is quite easy, for anyone with a
Windows system and a network connection. That there has been so much
misinformation (and unproductive hostility, from certain quarters)
amply justifies the rule among most clc regulars against answering OT
questions.

If the proponents of providing OT answers cannot get them right, who
here will correct them?

--
Michael Wojcik (e-mail address removed)

Reversible CA's are -automorphisms- on shift spaces. It is a notorious
fact in symbolic dynamics that describing such things on a shift of finite
type are -fiendishly- difficult. -- Chris Hillman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,184
Messages
2,570,978
Members
47,561
Latest member
gjsign

Latest Threads

Top