- Timestamp:
- Sep 8, 2004, 4:38:54 AM (21 years ago)
- Location:
- branches/GNU/src/gmake
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gmake/acinclude.m4
r52 r149 89 89 dnl From Paul Eggert <eggert@twinsun.com> 90 90 91 AC_DEFUN( AC_STRUCT_ST_MTIM_NSEC,91 AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC], 92 92 [AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim], 93 93 ac_cv_struct_st_mtim_nsec, … … 102 102 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" 103 103 AC_TRY_COMPILE([#include <sys/types.h> 104 #include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;], 104 #include <sys/stat.h> 105 ], [struct stat s; s.st_mtim.ST_MTIM_NSEC;], 105 106 [ac_cv_struct_st_mtim_nsec=$ac_val; break]) 106 107 done 107 CPPFLAGS="$ac_save_CPPFLAGS"]) 108 CPPFLAGS="$ac_save_CPPFLAGS" 109 ]) 108 110 109 111 if test $ac_cv_struct_st_mtim_nsec != no; then 110 AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, [Define if 'struct stat' contains a nanoseconds field]) 112 AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec], 113 [Define if struct stat contains a nanoseconds field]) 111 114 fi 112 115 ] 113 116 ) 114 115 116 dnl ---------------------------------------------------------------------------117 dnl This will be in the next version of autoconf; take this out then!118 119 # make_FUNC_SETVBUF_REVERSED120 # ------------------------121 AC_DEFUN([make_FUNC_SETVBUF_REVERSED],122 [AC_REQUIRE([AC_C_PROTOTYPES])dnl123 AC_CACHE_CHECK(whether setvbuf arguments are reversed,124 ac_cv_func_setvbuf_reversed,125 [ac_cv_func_setvbuf_reversed=no126 AC_LINK_IFELSE(127 [AC_LANG_PROGRAM(128 [[#include <stdio.h>129 # if PROTOTYPES130 int (setvbuf) (FILE *, int, char *, size_t);131 # endif]],132 [[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])],133 [AC_LINK_IFELSE(134 [AC_LANG_PROGRAM(135 [[#include <stdio.h>136 # if PROTOTYPES137 int (setvbuf) (FILE *, int, char *, size_t);138 # endif]],139 [[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])],140 [# It compiles and links either way, so it must not be declared141 # with a prototype and most likely this is a K&R C compiler.142 # Try running it.143 AC_RUN_IFELSE(144 [AC_LANG_PROGRAM(145 [[#include <stdio.h>]],146 [[/* This call has the arguments reversed.147 A reversed system may check and see that the address of buf148 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */149 char buf;150 if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)151 exit (1);152 putchar ('\r');153 exit (0); /* Non-reversed systems SEGV here. */]])],154 ac_cv_func_setvbuf_reversed=yes,155 rm -f core core.* *.core,156 [[: # Assume setvbuf is not reversed when cross-compiling.]])]157 ac_cv_func_setvbuf_reversed=yes)])])158 if test $ac_cv_func_setvbuf_reversed = yes; then159 AC_DEFINE(SETVBUF_REVERSED, 1,160 [Define to 1 if the `setvbuf' function takes the buffering type as161 its second argument and the buffer pointer as the third, as on162 System V before release 3.])163 fi164 ])# make_FUNC_SETVBUF_REVERSED
Note:
See TracChangeset
for help on using the changeset viewer.