/* Generate a temporary filename. */
extern char *tmpnam (char *__s) __THROW;
__END_NAMESPACE_STD
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
that it does not allow S to be NULL. */
extern char *tmpnam_r (char *__s) __THROW;
#endif
I understand the include guards and that extern declares (but not
defines) a variable. I just am drawing a blank on what __THROW. Can
someone please enlighten me on this?
Thanks in advance
Chad
Ask the person who wrote it. It's not something specified by the C
standard beyond the fact that identifiers that begin with double
underscores are reserved for the implementation for whatever use
it likes.
> For example, in I see stuff
> like the following in stdio.h:
> ...
That may be what is in _your_ implementation's <stdio.h>, but it
is not required to be in anyone else's. Indeed, there is no requirement
that a file called stdio.h even exist.
Comp.lang.c doesn't deal with underlying implementation specifics. It
only
deals with what the minimal C language definition and the C virtual
machine.
I suggest you try a newsgroup dedicated to your implementation.
--
Peter
I checked mingw's stdio.h and there's no __THROW. My Linux box has it.
I think it's related to implementing ISO C stdio on top on C++
iostreams but I'm not sure so you should probably wait for someone else
to answer the question.
>What purpose does __THROW serve in stdio.h. For example, in I see stuff
>like the following in stdio.h:
>
>/* Generate a temporary filename. */
>extern char *tmpnam (char *__s) __THROW;
>__END_NAMESPACE_STD
This is a system-specific issue, and does not apply to C.
For reference, __THROW is meant to declare the function as capable of
throwing exceptions (a C++ feature). In C, the macro does nothing.
Okay. Thanks. I wasn't aware _THROW was system-specific.
Chad