1 From pere@minerva.cc.uit.no Sun Oct 25 20:26:55 1998
2 Received: from minerva.cc.uit.no (pere@nb38.stud.cs.UiT.No [129.242.13.48])
3 by yuubin.games.no (8.8.7/8.8.7) with ESMTP id VAA24459
4 for <pere@games.no>; Sun, 25 Oct 1998 21:26:54 +0100
5 Received: (from pere@localhost)
6 by minerva.cc.uit.no (8.8.7/8.8.7) id VAA26463;
7 Sun, 25 Oct 1998 21:26:59 +0100
8 Date: Sun, 25 Oct 1998 21:26:59 +0100
9 Message-Id: <199810252026.VAA26463@minerva.cc.uit.no>
10 From: Petter Reinholdtsen <pere@localhost.localdomain>
11 To: patches@winehq.com
12 Subject: Patch for more warnings when compiling wine
16 Here is a patch to get more warnings when compiling Wine. There are
17 lots of bugs which would be discovered with more warnings, so I
18 beleave these new warnings should be default.
22 * configure.in acinclude.m4: Petter Reinholdtsen <pere@td.org.uit.no>
23 Add '-Wstrict-prototypes -Wcomments -pedantic' and '-ansi' when
24 --enable-ansi is used, to CFLAGS when using GCC. The code currently
25 fails to compile when -ansi is used.
28 ===================================================================
29 RCS file: /home/wine/wine/configure.in,v
30 retrieving revision 1.4
31 diff -u -r1.4 configure.in
32 --- configure.in 1998/10/11 17:09:05 1.4
33 +++ configure.in 1998/10/25 20:23:45
35 [ --disable-emulator build only the Wine library, not the emulator],
36 [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
39 +[ --enable-ansi warn on non ANSI C code], )
42 [ --enable-dll build the Wine library as a DLL],
43 [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
45 dnl **** If ln -s doesn't work, use cp instead ****
46 if test "$ac_cv_prog_LN_S" = "ln -s"; then : ; else LN_S=cp ; fi
48 -dnl **** Check for gcc strength-reduce bug ****
50 if test "x${GCC}" = "xyes"
52 - CFLAGS="$CFLAGS -Wall"
54 + # We want warnings, lots of warnings :-)
55 + WINE_GREP_CFLAGS(-Wall, [
56 + CFLAGS="$CFLAGS -Wall"
58 + WINE_GREP_CFLAGS(-Wstrict-prototypes, [
59 + CFLAGS="$CFLAGS -Wstrict-prototypes"
62 + WINE_GREP_CFLAGS(-Wcomments, [
63 + CFLAGS="$CFLAGS -Wcomments"
66 + WINE_GREP_CFLAGS(-pedantic, [
67 + CFLAGS="$CFLAGS -pedantic"
70 + if eval "test x$enable_ansi = xyes"; then
71 + WINE_GREP_CFLAGS(-ansi, [
72 + CFLAGS="$CFLAGS -ansi"
76 +dnl **** Check for gcc strength-reduce bug ****
78 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
82 ============================ acinclude.m4 ================================
84 dnl Run 'aclocal; autoconf' to get this this include in configure
87 dnl WINE_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
88 AC_DEFUN(WINE_GREP_CFLAGS,
90 "$1" | "$1 "* | *" $1" | *" $1 "* )
91 ifelse($#, 3, [$3], [:])
98 ===========================================================================
100 ##> Petter Reinholdtsen <## | pere@td.org.uit.no