This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH mingw32 Another change to allow mainline to bootstrap.
Zack Weinberg wrote:
"Aaron W. LaFramboise" <aaronblue6@cox-internet.com> writes:
MinGW itself presently does not define have a getpagesize() at all.
So, would this be acceptable?
2004-05-31 Aaron W. LaFramboise <aaronraolete36@aaronwl.com>
* system.h: Prototype getpagesize on Windows.
Like I said, if you have to do this (which it seems you do) then write
a proper autoconf check for it.
OK, how about this? It doesn't look like config.in had been regenerated
in a while, so some of the changes appear to be unrelated to the change
to configure.ac. Thank you for your help, by the way.
2004-05-31 Aaron W. LaFramboise <aaronraolete36@aaronwl.com>
* system.h: Prototype getpagesize if missing.
* configure.ac: Add getpagesize to gcc_AC_CHECK_DECLS.
* configure: Regenerate.
* config.in: Regenerate.
Index: gcc/gcc/config.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config.in,v
retrieving revision 1.185
diff -c -3 -p -r1.185 config.in
*** gcc/gcc/config.in 13 May 2004 06:39:33 -0000 1.185
--- gcc/gcc/config.in 31 May 2004 22:18:06 -0000
***************
*** 53,59 ****
/* Define if you want all operations on trees (the basic data
structure of the
front ends) to be checked for dynamic type safety at runtime. This is
! moderately expensive. */
#undef ENABLE_TREE_CHECKING
/* Define if you want to run subprograms and generated programs through
--- 53,60 ----
/* Define if you want all operations on trees (the basic data
structure of the
front ends) to be checked for dynamic type safety at runtime. This is
! moderately expensive. The tree browser debugging routines will also be
! enabled by this option. */
#undef ENABLE_TREE_CHECKING
/* Define if you want to run subprograms and generated programs through
***************
*** 135,140 ****
--- 136,144 ----
/* Define to 1 if you have the `atoq' function. */
#undef HAVE_ATOQ
+ /* Define if BANSHEE is available */
+ #undef HAVE_BANSHEE
+
/* Define to 1 if you have the `clock' function. */
#undef HAVE_CLOCK
***************
*** 184,189 ****
--- 188,196 ----
#undef HAVE_DECL_GETOPT
/* Define to 1 if we found this declaration otherwise define to 0. */
+ #undef HAVE_DECL_GETPAGESIZE
+
+ /* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETRLIMIT
/* Define to 1 if we found this declaration otherwise define to 0. */
***************
*** 437,445 ****
/* Define to 1 if you have the <time.h> header file. */
#undef HAVE_TIME_H
- /* Define if <sys/types.h> defines \`uchar'. */
- #undef HAVE_UCHAR
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
--- 444,449 ----
***************
*** 567,581 ****
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
-
- /* Define if your linker supports -pie option. */
- #undef HAVE_LD_PIE
-
- /* Define if BANSHEE is available */
- #undef HAVE_BANSHEE
-
- /* Define to PREFIX/include if cpp should also search that directory. */
- #undef PREFIX_INCLUDE_DIR
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
--- 571,576 ----
Index: gcc/gcc/configure
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure,v
retrieving revision 1.826
diff -c -3 -p -r1.826 configure
*** gcc/gcc/configure 27 May 2004 19:47:36 -0000 1.826
--- gcc/gcc/configure 31 May 2004 22:18:31 -0000
*************** saved_CFLAGS="$CFLAGS"
*** 8277,8284 ****
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
for ac_func in getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
! fprintf_unlocked strstr errno snprintf vasprintf \
! malloc realloc calloc free basename getopt clock
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr
'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
--- 8277,8285 ----
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
for ac_func in getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
! fprintf_unlocked strstr errno snprintf vasprintf \
! malloc realloc calloc free basename getopt clock \
! getpagesize
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr
'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
*************** _ACEOF
*** 8450,8455 ****
--- 8451,8461 ----
cat >>confdefs.h <<\_ACEOF
#define HAVE_DECL_CLOCK 1
+ _ACEOF
+ \
+
+ cat >>confdefs.h <<\_ACEOF
+ #define HAVE_DECL_GETPAGESIZE 1
_ACEOF
fi
Index: gcc/gcc/configure.ac
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.39
diff -c -3 -p -r2.39 configure.ac
*** gcc/gcc/configure.ac 27 May 2004 19:47:36 -0000 2.39
--- gcc/gcc/configure.ac 31 May 2004 22:18:45 -0000
*************** saved_CFLAGS="$CFLAGS"
*** 970,977 ****
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
! fprintf_unlocked strstr errno snprintf vasprintf \
! malloc realloc calloc free basename getopt clock, , ,[
#include "ansidecl.h"
#include "system.h"])
--- 970,978 ----
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
! fprintf_unlocked strstr errno snprintf vasprintf \
! malloc realloc calloc free basename getopt clock \
! getpagesize, , ,[
#include "ansidecl.h"
#include "system.h"])
Index: gcc/gcc/system.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/system.h,v
retrieving revision 1.213
diff -c -3 -p -r1.213 system.h
*** gcc/gcc/system.h 24 May 2004 10:50:40 -0000 1.213
--- gcc/gcc/system.h 31 May 2004 22:18:45 -0000
*************** extern char *getenv (const char *);
*** 303,308 ****
--- 303,312 ----
extern int getopt (int, char * const *, const char *);
#endif
+ #if defined(HAVE_DECL_GETPAGESIZE) && !HAVE_DECL_GETPAGESIZE
+ extern long getpagesize (void);
+ #endif
+
#if defined (HAVE_DECL_GETWD) && !HAVE_DECL_GETWD
extern char *getwd (char *);
#endif