What is C header file sys/cdefs.h used for?

A

Antoninus Twink

The group is for discussing the C language. Hence the name.

What, are you finally beginning to understand, Heathfield?

Yes, it is for discussion of C. Not "ISO C", but all C.

And you're right, the clue is in the name: comp.lang.c, not
comp.lang.iso-c.
 
K

Keith Thompson

lauren said:
I've found this in some source file and have no idea what it is used
for. And help?

I see sys/cdefs.h files on at least two of the systems I use. They're
quite different. One is part of Cygwin, the other is part of the GNU
C library. Another system I use has no such file.

If you take a look at the file itself (likely
"/usr/include/sys/cdefs.h"), that should give you an idea of where to
inquire further.
 
R

Richard

qarnos said:
For the record, here is a link to the Google archive of the first
message in net.lang.c (The former comp.lang.c, as Richard Harter
points out further downthread):

http://tinyurl.com/9zfzkw

For those that don't follow anonymous links, it pretty much states the
group as I and most other level headed people see it:

,----
| It's purpose is to carry on discussion of C programming and
| the C programming language. Appropriate topics are
|
| Queries on how to write something in C
| Queries about why some C code behaves the way it does
| Suggestions for C modifications or extensions
| C coding "tricks"
| Compiler bugs
| Availability of compilers
| etc.
`----

A place for C programmers from various arenas to meet, swap anecdotes
and tricks and promote good, strong and healthy C techniques. Including
but not limited to better C environments and tools to guide the
programmer.
 
F

Flash Gordon

Richard said:
Flash Gordon said:


Sure - and I can understand why you'd want to point this out. Having
said that, the bright people here can work that out for themselves,
and the dumb ones won't believe you anyway.

I did not expect any of the regulars (including regular trolls) to
believe Han on this. I was putting it on records for anyone else that
actually cares and sees that specific post.
 
S

Sjouke Burry

lauren said:
I've found this in some source file and have no idea what it is used
for. And help?
Anytime I want to know what a header file
is about, I just open it in a reader/editor
and start to read the file.
The quickest way to know what it does.
 
J

Joachim Schmitz

Antoninus said:
What, are you finally beginning to understand, Heathfield?

Yes, it is for discussion of C. Not "ISO C", but all C.

When will you finally understand thet C and ISO-C is the very same thing. C
is the the language invented by K&R and later standardized by ANSI/ISO. This
is topical here.
It is different from C#, C++, GnuC, M$ Visual C, all of which have their own
newsgroups. Neither is topical here.

Bye, Jojo
 
R

Richard

Joachim Schmitz said:
When will you finally understand thet C and ISO-C is the very same
thing

No they are not. Whoever told you that? If they were the same thing then
there would not be the terms "ISO C" AND "C".
C is the the language invented by K&R and later standardized by
ANSI/ISO. This is topical here.

So is K&R C the same thing? No?
It is different from C#, C++, GnuC, M$ Visual C, all of which have
their own newsgroups. Neither is topical here.

Nice try. C# and C++ are different languages completely.

Gnu C is C. C allows for extensions. "comp.lang.c". You have seen the
original reasons for forming the group.

Try to get over yourself a little and you might, just might, be a worthy
contributor.

Failing that, form a comp.lang.iso-c and head on over there.
 
D

Dik T. Winter

> On Jan 9, 5:09=A0am, (e-mail address removed) wrote: ....
>
> For the record, here is a link to the Google archive of the first
> message in net.lang.c (The former comp.lang.c, as Richard Harter
> points out further downthread):
>
> http://tinyurl.com/9zfzkw

For the record, at that time topicality of newsgroups was not interesting
at all. At that time our newsfeed (complete, i.e. all newsgroups) was
running one or two hours a night over a trans-atlantic 2400 baud dial-up
telephone line... It was easy to read all articles in all newsgroups.
 
J

Joachim Schmitz

Richard said:
No they are not. Whoever told you that? If they were the same thing
then there would not be the terms "ISO C" AND "C".

The ISO standard.
So is K&R C the same thing? No?

Indeed. That's why RH rightly mentions it as being an exeption, for
historical reasons.
Nice try. C# and C++ are different languages completely.

Indeed, regardless questions about them are asked here. And even replied to
Gnu C is C.
gcc can be invoked in conforming C98/C90 mode and in an almost C99 mode. Not
doing this makes is a compiled of a C-like language that violates the ISO
standard in several places
C allows for extensions. "comp.lang.c".

Extensions are allowed, as long as they don't violate the standard.
You have seen the
original reasons for forming the group.

So what? Since the early days usenet grew a lot and quite a few additional
groups appeared, e.g. comp.std.c and lots of compiler specific groups. They
have been created to take off load from comp.lang.c (at least that's one of
the reasons)

Bye, Jojo
 
R

Richard

Joachim Schmitz said:
The ISO standard.


Indeed. That's why RH rightly mentions it as being an exeption, for
historical reasons.

So its not the same thing? Its an exception.

Look, go create your iso-c group and have fun.

Meanwhile the rest of us will discuss real C in the real world to help
real people. If you don't like it then tough. All the whining and
whinging in the world won't help you and will probably just see you
killfiled. If you want to argue sizeof semantics with Chuck Falconer for
the rest of your life then good luck.
 
B

Bartc

Look, go create your iso-c group and have fun.

Meanwhile the rest of us will discuss real C in the real world to help
real people. If you don't like it then tough. All the whining and
whinging in the world won't help you and will probably just see you
killfiled. If you want to argue sizeof semantics with Chuck Falconer for
the rest of your life then good luck.

It wasn't just me finding that particular discussion tedious then.

-- Bartc
 
R

Richard

Bartc said:
It wasn't just me finding that particular discussion tedious then.

-- Bartc

I find it shocking that grown men and get such a stiffy from being such
idiots in public. This "standard" brandishing has gone on too long in
here. Compile a damn sample and see what the compiler says .... Sheesh
:-;
 
J

Joachim Schmitz

Richard wrote:
I find it shocking that grown men and get such a stiffy from being
such idiots in public.

Indeed. Only we seem to differ in who we think to be idiots

Bye, Jojo
 
K

Keith Thompson

Richard Heathfield said:
Joachim Schmitz said:
When will you finally understand thet C and ISO-C is the very same
thing.

He won't. [...]
I am reasonably sure that he understands what you mean, but he
simply doesn't agree with you.

I suspect you give him too much credit.
 
K

Keith Thompson

Richard Heathfield said:
Keith Thompson said:
Richard Heathfield said:
Joachim Schmitz said:
Antoninus Twink wrote:
On 8 Jan 2009 at 18:35, Richard Heathfield wrote:
The group is for discussing the C language. Hence the name.

What, are you finally beginning to understand, Heathfield?

Yes, it is for discussion of C. Not "ISO C", but all C.

When will you finally understand thet C and ISO-C is the very
same thing.

He won't. [...]
I am reasonably sure that he understands what you mean, but he
simply doesn't agree with you.

I suspect you give him too much credit.

It's been a long time since I read one of his articles, for what I
hope are obvious reasons, but I find it hard to believe that even
he is so stupid as to be unable to understand the point.

I could, of course, be mistaken.

I wasn't suggesting stupidity, but I've given him too much attention
as it is, so I won't bother to elaborate.
 
A

Antoninus Twink

Joachim Schmitz said:

I am reasonably sure that he understands what you mean, but he simply
doesn't agree with you.

Got it in one Heathfield! Well done.

To see how ridiculous your position is, you only have to look at your
assertion that "C and ISO C are the same thing; that's all that's
topical here. Oh, but K&R C is an exception to this rule". This
exception is quite arbitrary - if you really believed that C was what
ISO defined and nothing else, then K&R C would be just as "off topic" as
you claim GNU C to be, since by your definition neither of them is C.
 
Q

qarnos

For the record, at that time topicality of newsgroups was not interesting
at all.  At that time our newsfeed (complete, i.e. all newsgroups) was
running one or two hours a night over a trans-atlantic 2400 baud dial-up
telephone line...  It was easy to read all articles in all newsgroups.

I'm not arguing about topicality. Someone asked if Han was lying about
the original post - so I posted a link to it.
 
T

Tony

James Kuyper said:
lauren said:
Kenny said:
I've found this in some source file and have no idea what it is used
for. And help?

(hah hah hah - beat you to it, Keith [and others])

Off topic. Not portable. Cant discuss it here. Blah, blah, blah.

Of course I know this is not "that" portable but this is a component of
glibc and surely portable at least among Linux world. Standard C has only
24 header files and we surely need to learn others :)

True, but the appropriate place to discuss those other headers is a forum
devoted specifically to the kind of systems where those headers are
present. A quick look at the file suggests that it may be gcc-specific, so
look for a gcc forum.

Is it not silly to disallow discussions of PRACTICAL usage of C and to only
allow discussion of the starter ingredients that the C standard provides?

There are, of course, only 2 programs that can be written in standard C: One
called "Undefined Behavior" and the other "Implementation Defined". ;)

Tony
 
T

Tony

The group is for discussing the C language. Hence the name. The
internationally-accepted definition of the C language is ISO/IEC
9899 (de jure: 1999; de facto: 1990). K&R C is considered topical
for historical reasons.

Perhaps what is needed, assuming your assertion is correct, is:

comp.lang.c.practicalusage

or even:

comp.lang.c.practicalreplacement

UB.h/UB.c and ID.h/ID.c surely must be optimised and obfuscated maximally by
now (?).

Anyway, I gotta go read comp.programming.c where they've been trying to
write a program called "Hello World!", PORTABLY, for decades now.

Tony ;)
 
K

Kenny McCormack

Perhaps what is needed, assuming your assertion is correct, is:

comp.lang.c.practicalusage

or even:

comp.lang.c.practicalreplacement

UB.h/UB.c and ID.h/ID.c surely must be optimised and obfuscated maximally by
now (?).

The point is that the real, underlying problem, is simply that
comp.lang.c is misnamed. If it were named something like
comp.lanc.iso-c-only or comp.lang.obscurely-academic.c or
comp.lang.JerryFallwellApproved.c, we'd have no problem with it. They
could discuss whatever they want.

But the problem is that somehow this bunch of fanatics got hold of the
"top level domain". That's what causes all the confusion.
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top