summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-10-28 06:51:06 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-10-28 06:51:06 +0000
commitf541fed27b05edd7d90f9313f133c1edb16df774 (patch)
tree52c9b11b148ee91d671633e9bc9cc82c496af0b5
parent22e7043adb0bc1aba7f6fd174346f76192f0b5f1 (diff)
Do not enable putc() macro implementation if _POSIX_SOURCE is defined;
it is not fully compliant
-rw-r--r--include/stdio.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/stdio.h b/include/stdio.h
index acff5f23944..d5152a67704 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdio.h,v 1.6 1996/07/26 10:34:25 deraadt Exp $ */
+/* $OpenBSD: stdio.h,v 1.7 1996/10/28 06:51:05 tholo Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*-
@@ -371,7 +371,13 @@ static __inline int __sputc(int _c, FILE *_p) {
#ifndef lint
#define getc(fp) __sgetc(fp)
+/*
+ * The macro implementation of putc is not fully POSIX
+ * compliant; it does not set errno on failure
+ */
+#ifndef _POSIX_SOURCE
#define putc(x, fp) __sputc(x, fp)
+#endif /* _POSIX_SOURCE */
#endif /* lint */
#define getchar() getc(stdin)