Skip to Content
XLIB Programming Manual, Rel. 5, Third Edition
book

XLIB Programming Manual, Rel. 5, Third Edition

by Adrian Nye
June 1994
Intermediate to advanced
821 pages
24h 40m
English
O'Reilly Media, Inc.
Content preview from XLIB Programming Manual, Rel. 5, Third Edition

15.10 ANSI-C and POSIX Portability

The MIT Release 5 X distribution is compliant with ANSI-C and POSIX standards, and portable across a wide variety of platforms. While the goal of the ANSI-C and POSIX standards is portability, many systems do not implement these standards, or do not implement them fully, so the MIT R5 distribution defines new header files that attempt to mask the differences between systems. The header files are <X11/Xfuncproto.h>, <X11/Xfuncs.h>, <X11/Xosdefs.h>, and <X11/Xos.h>. None of these files are part of the official R5 standard, so they may not be shipped with your system. But they can be very useful in writing portable applications, so we have included them with the code from this book, which you can get as described in the Preface.[57]

15.10.1 <X11/Xosdefs.h>

The file <X11/Xosdefs.h> defines symbols that describe a system’s support for ANSI-C and POSIX. Symbols that describe a system’s support for other standards may be added in the future. It defines two new symbols, X_NOT_STDC_ENV and X_NOT_POSIX, for systems that do not have the ANSI-C and POSIX header files, respectively. When standard header files exist, your code should include them. On systems which do not have them, however, attempting to include them would cause a compilation error. The symbols in <X11/Xosdefs.h> allow you to write code that takes the right action in either situation. Note that X_NOT_STDC_ENV is different from __STDC__, which simply indicates whether or not the compiler supports ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Xlib Reference Manual for Version 11 of the X Window System

Xlib Reference Manual for Version 11 of the X Window System

Adrian Nye

Publisher Resources

ISBN: 9780596806187Supplemental ContentCatalog PageErrata