]> pere.pagekite.me Git - homepage.git/blob - linux/wine-ccwarn.diff
Generated.
[homepage.git] / linux / wine-ccwarn.diff
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
13 Status: RO
14
15
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.
19
20 ChangeLog entry:
21
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.
26
27 Index: configure.in
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
34 @@ -23,6 +23,9 @@
35 [ --disable-emulator build only the Wine library, not the emulator],
36 [if test "$enableval" = "no"; then MAIN_TARGET="lib"; fi])
37
38 +AC_ARG_ENABLE(ansi,
39 +[ --enable-ansi warn on non ANSI C code], )
40 +
41 AC_ARG_ENABLE(dll,
42 [ --enable-dll build the Wine library as a DLL],
43 [if test "$enableval" = "no"; then : ; else LIB_TARGET="libwine.so.1.0"; fi])
44 @@ -127,11 +130,33 @@
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
47
48 -dnl **** Check for gcc strength-reduce bug ****
49 -
50 if test "x${GCC}" = "xyes"
51 then
52 - CFLAGS="$CFLAGS -Wall"
53 +
54 + # We want warnings, lots of warnings :-)
55 + WINE_GREP_CFLAGS(-Wall, [
56 + CFLAGS="$CFLAGS -Wall"
57 + ])
58 + WINE_GREP_CFLAGS(-Wstrict-prototypes, [
59 + CFLAGS="$CFLAGS -Wstrict-prototypes"
60 + ])
61 +
62 + WINE_GREP_CFLAGS(-Wcomments, [
63 + CFLAGS="$CFLAGS -Wcomments"
64 + ])
65 +
66 + WINE_GREP_CFLAGS(-pedantic, [
67 + CFLAGS="$CFLAGS -pedantic"
68 + ])
69 +
70 + if eval "test x$enable_ansi = xyes"; then
71 + WINE_GREP_CFLAGS(-ansi, [
72 + CFLAGS="$CFLAGS -ansi"
73 + ])
74 + fi
75 +
76 +dnl **** Check for gcc strength-reduce bug ****
77 +
78 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
79 AC_TRY_RUN([
80 int main(void) {
81
82 ============================ acinclude.m4 ================================
83 dnl
84 dnl Run 'aclocal; autoconf' to get this this include in configure
85 dnl
86
87 dnl WINE_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
88 AC_DEFUN(WINE_GREP_CFLAGS,
89 [case "$CFLAGS" in
90 "$1" | "$1 "* | *" $1" | *" $1 "* )
91 ifelse($#, 3, [$3], [:])
92 ;;
93 *)
94 $2
95 ;;
96 esac
97 ])
98 ===========================================================================
99 --
100 ##> Petter Reinholdtsen <## | pere@td.org.uit.no
101