summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>1994-08-02 09:41:55 +0000
committerTom Yu <tlyu@mit.edu>1994-08-02 09:41:55 +0000
commit9f99c5480d52968b530169b4324738b9c718e791 (patch)
tree50f13b68b10fc279d59f96e986017b4136359b61 /src/include
parent9e05c3038c1d88e28c82a7bc079da370cec19e37 (diff)
downloadkrb5-9f99c5480d52968b530169b4324738b9c718e791.tar.gz
krb5-9f99c5480d52968b530169b4324738b9c718e791.tar.xz
krb5-9f99c5480d52968b530169b4324738b9c718e791.zip
fixes to dtrt with ANSI_STDIO; previously there was gratuitous abuse of
this particular definition, as it was really just detecting the presence of setvbuf(). Now it does a compile-and-run to check for binary fopen() availability, and the check for setvbuf() has been moved. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4030 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r--src/include/krb5/ChangeLog7
-rw-r--r--src/include/krb5/acconfig.h1
-rw-r--r--src/include/krb5/configure.in18
3 files changed, 23 insertions, 3 deletions
diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog
index 7dae7d2d99..cfbf9bc758 100644
--- a/src/include/krb5/ChangeLog
+++ b/src/include/krb5/ChangeLog
@@ -1,3 +1,10 @@
+Tue Aug 2 03:39:14 1994 Tom Yu (tlyu@dragons-lair)
+
+ * acconfig.h: add HAVE_SETVBUF
+
+ * configure.in: changes to make things saner when checking for
+ ANSI_STDIO
+
Thu Jul 14 03:31:06 1994 Tom Yu (tlyu at dragons-lair)
* Makefile.in: some cleanup to not echo cruft
diff --git a/src/include/krb5/acconfig.h b/src/include/krb5/acconfig.h
index 7d84251c59..eaf5ca50df 100644
--- a/src/include/krb5/acconfig.h
+++ b/src/include/krb5/acconfig.h
@@ -1,6 +1,7 @@
/* just stuff needed by kerberos 5 */
#undef ANSI_STDIO
+#undef HAS_SETVBUF
#undef BITS32
#undef HAS_ANSI_CONST
#undef HAS_ANSI_VOLATILE
diff --git a/src/include/krb5/configure.in b/src/include/krb5/configure.in
index e6204a181a..3b4d5b0cdd 100644
--- a/src/include/krb5/configure.in
+++ b/src/include/krb5/configure.in
@@ -39,9 +39,21 @@ AC_HEADER_CHECK(string.h,AC_DEFINE(USE_STRING_H))
AC_HEADER_CHECK(stdlib.h,AC_DEFINE(HAS_STDLIB_H),AC_DEFINE(NO_STDLIB_H))
CHECK_STDARG
-dnl this is misused to *also* mean that "b" is needed to fopen binary...
-AC_FUNC_CHECK([setvbuf],AC_DEFINE(ANSI_STDIO))
-
+AC_FUNC_CHECK([setvbuf],AC_DEFINE(HAS_SETVBUF))
+dnl check for ANSI stdio, esp "b" option to fopen(). This (unfortunately)
+dnl requires a run check...
+AC_CHECKING([for ANSI stdio])
+AC_TEST_PROGRAM([
+#include <stdio.h>
+int main()
+{
+ FILE *conftest;
+ if ((conftest = fopen("conftest.dat", "w")) == NULL) exit(1);
+ if (fclose(conftest)) exit(1);
+ if ((conftest = fopen("conftest.dat", "rb+")) == NULL) exit(1);
+ if (fputs("testing ANSI for stdio\n", conftest) == EOF) exit(1);
+ exit(0);
+}],AC_DEFINE(ANSI_STDIO))
AC_COMPILE_CHECK([prototype support],
[int x(double y, int z);],,AC_DEFINE(KRB5_PROVIDE_PROTOTYPES))