app-emulation/wine: Version bump to 1.9.8
[gentoo.git] / app-emulation / wine / files / wine-1.9.7-sysmacros.patch
1 From ca8a08606d3f0900b3f4aa8f2e6547882a22dba8 Mon Sep 17 00:00:00 2001
2 From: Seong-ho Cho <darkcircle.0426@gmail.com>
3 Date: Mon, 18 Apr 2016 04:25:38 +0900
4 Subject: [PATCH] configure: Add AC_HEADER_MAJOR to find where major() is
5  defined.
6
7 Signed-off-by: Seong-ho Cho <darkcircle.0426@gmail.com>
8 Signed-off-by: Alexandre Julliard <julliard@winehq.org>
9 ---
10  configure              | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
11  configure.ac           |  1 +
12  dlls/ntdll/cdrom.c     |  5 +++++
13  dlls/ntdll/directory.c |  5 +++++
14  dlls/ntdll/file.c      |  5 +++++
15  include/config.h.in    |  8 ++++++++
16  server/fd.c            |  5 +++++
17  7 files changed, 79 insertions(+)
18
19 diff --git a/configure b/configure
20 index 1cb0e59..ffb1825 100755
21 --- a/configure
22 +++ b/configure
23 @@ -6836,6 +6836,56 @@ fi
24  
25  done
26  
27 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
28 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
29 +if ${ac_cv_header_sys_types_h_makedev+:} false; then :
30 +  $as_echo_n "(cached) " >&6
31 +else
32 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33 +/* end confdefs.h.  */
34 +#include <sys/types.h>
35 +int
36 +main ()
37 +{
38 +return makedev(0, 0);
39 +  ;
40 +  return 0;
41 +}
42 +_ACEOF
43 +if ac_fn_c_try_link "$LINENO"; then :
44 +  ac_cv_header_sys_types_h_makedev=yes
45 +else
46 +  ac_cv_header_sys_types_h_makedev=no
47 +fi
48 +rm -f core conftest.err conftest.$ac_objext \
49 +    conftest$ac_exeext conftest.$ac_ext
50 +
51 +fi
52 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
53 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
54 +
55 +if test $ac_cv_header_sys_types_h_makedev = no; then
56 +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
57 +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
58 +
59 +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
60 +
61 +fi
62 +
63 +
64 +
65 +  if test $ac_cv_header_sys_mkdev_h = no; then
66 +    ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
67 +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
68 +
69 +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
70 +
71 +fi
72 +
73 +
74 +  fi
75 +fi
76 +
77  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
78  $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
79  if ${ac_cv_header_stat_broken+:} false; then :
80 diff --git a/configure.ac b/configure.ac
81 index 6189aa9..201bc77 100644
82 --- a/configure.ac
83 +++ b/configure.ac
84 @@ -512,6 +512,7 @@ AC_CHECK_HEADERS(\
85         valgrind/valgrind.h \
86         zlib.h
87  )
88 +AC_HEADER_MAJOR()
89  AC_HEADER_STAT()
90  
91  dnl **** Checks for headers that depend on other ones ****
92 diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
93 index ee36045..2c64106 100644
94 --- a/dlls/ntdll/cdrom.c
95 +++ b/dlls/ntdll/cdrom.c
96 @@ -38,6 +38,11 @@
97  #ifdef HAVE_SYS_STAT_H
98  # include <sys/stat.h>
99  #endif
100 +#ifdef MAJOR_IN_MKDEV
101 +# include <sys/mkdev.h>
102 +#elif defined(MAJOR_IN_SYSMACROS)
103 +# include <sys/sysmacros.h>
104 +#endif
105  #include <sys/types.h>
106  
107  #ifdef HAVE_SYS_IOCTL_H
108 diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
109 index 93fe594..4d431c0 100644
110 --- a/dlls/ntdll/directory.c
111 +++ b/dlls/ntdll/directory.c
112 @@ -47,6 +47,11 @@
113  #ifdef HAVE_SYS_ATTR_H
114  #include <sys/attr.h>
115  #endif
116 +#ifdef MAJOR_IN_MKDEV
117 +# include <sys/mkdev.h>
118 +#elif defined(MAJOR_IN_SYSMACROS)
119 +# include <sys/sysmacros.h>
120 +#endif
121  #ifdef HAVE_SYS_VNODE_H
122  /* Work around a conflict with Solaris' system list defined in sys/list.h. */
123  #define list SYSLIST
124 diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
125 index 7e5da59..b3bd9d6 100644
126 --- a/dlls/ntdll/file.c
127 +++ b/dlls/ntdll/file.c
128 @@ -57,6 +57,11 @@
129  #ifdef HAVE_SYS_SOCKET_H
130  #include <sys/socket.h>
131  #endif
132 +#ifdef MAJOR_IN_MKDEV
133 +# include <sys/mkdev.h>
134 +#elif defined(MAJOR_IN_SYSMACROS)
135 +# include <sys/sysmacros.h>
136 +#endif
137  #ifdef HAVE_UTIME_H
138  # include <utime.h>
139  #endif
140 diff --git a/include/config.h.in b/include/config.h.in
141 index 0650f31..06b192f 100644
142 --- a/include/config.h.in
143 +++ b/include/config.h.in
144 @@ -1335,6 +1335,14 @@
145  /* Define to 1 if you have the `__res_get_state' function. */
146  #undef HAVE___RES_GET_STATE
147  
148 +/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
149 +   */
150 +#undef MAJOR_IN_MKDEV
151 +
152 +/* Define to 1 if `major', `minor', and `makedev' are declared in
153 +   <sysmacros.h>. */
154 +#undef MAJOR_IN_SYSMACROS
155 +
156  /* Define to the address where bug reports for this package should be sent. */
157  #undef PACKAGE_BUGREPORT
158  
159 diff --git a/server/fd.c b/server/fd.c
160 index 1fd1ce7..17b1b66 100644
161 --- a/server/fd.c
162 +++ b/server/fd.c
163 @@ -83,6 +83,11 @@
164  #endif
165  #include <sys/stat.h>
166  #include <sys/time.h>
167 +#ifdef MAJOR_IN_MKDEV
168 +#include <sys/mkdev.h>
169 +#elif defined(MAJOR_IN_SYSMACROS)
170 +#include <sys/sysmacros.h>
171 +#endif
172  #include <sys/types.h>
173  #include <unistd.h>
174  #ifdef HAVE_SYS_SYSCALL_H
175 -- 
176 2.7.4
177