Mercurial > emacs
comparison src/dispnew.c @ 7558:8497bcb9fb8e
(PENDING_OUTPUT_COUNT): If __GNU_LIBRARY__,
use GNU_LIBRARY_PENDING_OUTPUT_COUNT if defined.
Include errno.h.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 19 May 1994 18:42:37 +0000 |
parents | 57c2345a9002 |
children | 2e85e48d42da |
comparison
equal
deleted
inserted
replaced
7557:889a8cd345b2 | 7558:8497bcb9fb8e |
---|---|
43 | 43 |
44 #ifdef HAVE_X_WINDOWS | 44 #ifdef HAVE_X_WINDOWS |
45 #include "xterm.h" | 45 #include "xterm.h" |
46 #endif /* HAVE_X_WINDOWS */ | 46 #endif /* HAVE_X_WINDOWS */ |
47 | 47 |
48 #include <errno.h> | |
49 | |
48 #define max(a, b) ((a) > (b) ? (a) : (b)) | 50 #define max(a, b) ((a) > (b) ? (a) : (b)) |
49 #define min(a, b) ((a) < (b) ? (a) : (b)) | 51 #define min(a, b) ((a) < (b) ? (a) : (b)) |
50 | 52 |
51 /* Get number of chars of output now in the buffer of a stdio stream. | 53 /* Get number of chars of output now in the buffer of a stdio stream. |
52 This ought to be built in in stdio, but it isn't. | 54 This ought to be built in in stdio, but it isn't. |
53 Some s- files override this because their stdio internals differ. */ | 55 Some s- files override this because their stdio internals differ. */ |
54 #ifdef __GNU_LIBRARY__ | 56 #ifdef __GNU_LIBRARY__ |
55 /* The s- file might have overridden the definition with one that works for | 57 /* The s- file might have overridden the definition with one that works for |
56 the system's C library. But we are using the GNU C library, so this is | 58 the system's C library. But we are using the GNU C library, so this is |
57 the right definition for every system. */ | 59 the right definition for every system. */ |
60 #ifdef GNU_LIBRARY_PENDING_OUTPUT_COUNT | |
61 #define PENDING_OUTPUT_COUNT GNU_LIBRARY_PENDING_OUTPUT_COUNT | |
62 #else | |
58 #undef PENDING_OUTPUT_COUNT | 63 #undef PENDING_OUTPUT_COUNT |
59 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer) | 64 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer) |
60 #else | 65 #endif |
66 #else /* not __GNU_LIBRARY__ */ | |
61 #ifndef PENDING_OUTPUT_COUNT | 67 #ifndef PENDING_OUTPUT_COUNT |
62 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) | 68 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) |
63 #endif | 69 #endif |
64 #endif | 70 #endif |
65 | 71 |