#pragma

Karl Heuer karl at haddock.ima.isc.com
Mon Jun 11 05:56:11 AEST 1990


In article <2198.2670dea6 at cc.nu.oz> v8902477 at cc.nu.oz writes:
>Could somebody tell me what #pragma means???

Not unless you tell us what was on the rest of the source line, and even then
we can only guess what it probably meant on the system for which it was
originally written.  `#pragma' should always be enclosed in an appropriate
`#if', so that it's only visible to the implementations where it makes sense.

>And also what does the sys in #include <sys/types.h> do???

It's just part of the name of the header.  Often (but not always) it means
that the header will be read from a file named `types.h' in a subdirectory
`sys' of a directory containing includable files.

>These occured in a program I tried to compile under VAX C and it didn't
>work.

I would tentatively conclude that your implementation is (a) not ANSI
compatible (it should have ignored the unknown #pragma) and (b) not POSIX
compatible (which requires <sys/types.h> to exist).

>Also VAX C doesn't seem to have <sys/resources.h>.  What is this??

Assuming you meant that in the singular, <sys/resource.h>, it's a Berkeleyism.
Sounds like you're trying to port to VMS something that isn't even portable to
Unix.  I'd guess you need more help than you can get over the net.

Karl W. Z. Heuer (karl at ima.ima.isc.com or harvard!ima!karl), The Walking Lint



More information about the Comp.lang.c mailing list