Merge lp:~linuxjedi/libdrizzle/bootstrap-update-april-2013 into lp:libdrizzle
- bootstrap-update-april-2013
- Merge into libdrizzle-redux
Proposed by
Andrew Hutchings
Status: | Merged |
---|---|
Merged at revision: | 121 |
Proposed branch: | lp:~linuxjedi/libdrizzle/bootstrap-update-april-2013 |
Merge into: | lp:libdrizzle |
Diff against target: |
1275 lines (+487/-164) 5 files modified
bootstrap.sh (+358/-127) configure.ac (+3/-0) libdrizzle/sha1.cc (+1/-1) m4/ax_harden_compiler_flags.m4 (+114/-25) tests/unit/numbers.c (+11/-11) |
To merge this branch: | bzr merge lp:~linuxjedi/libdrizzle/bootstrap-update-april-2013 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Pending | ||
Review via email: mp+161343@code.launchpad.net |
Commit message
Description of the change
Fixes for MinGW after bootstrap update merges.
To post a comment you must log in.
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
- 124. By Andrew Hutchings
-
Fix numbers test for RHEL 6.3
Revision history for this message
Brian Aker (brianaker) wrote : | # |
It might be better to just suppress that waring.
Sent from my Ti85
On Apr 28, 2013, at 13:43, Andrew Hutchings <email address hidden> wrote:
> sha1 fix is probably "the wrong thing" but it was to kill this warning:
>
> sha1.cc:138: warning: assuming that the loop counter does not overflow
> --
> https:/
> You are requested to review the proposed merge of lp:~linuxjedi/libdrizzle/bootstrap-update-april-2013 into lp:libdrizzle.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bootstrap.sh' | |||
2 | --- bootstrap.sh 2013-01-10 12:04:23 +0000 | |||
3 | +++ bootstrap.sh 2013-04-28 22:03:24 +0000 | |||
4 | @@ -1,6 +1,6 @@ | |||
5 | 1 | #!/bin/bash | 1 | #!/bin/bash |
6 | 2 | # | 2 | # |
8 | 3 | # Copyright (C) 2012 Brian Aker | 3 | # Copyright (C) 2012-2013 Brian Aker |
9 | 4 | # All rights reserved. | 4 | # All rights reserved. |
10 | 5 | # | 5 | # |
11 | 6 | # Redistribution and use in source and binary forms, with or without | 6 | # Redistribution and use in source and binary forms, with or without |
12 | @@ -151,7 +151,8 @@ | |||
13 | 151 | fi | 151 | fi |
14 | 152 | } | 152 | } |
15 | 153 | 153 | ||
17 | 154 | # Valid values are: darwin,fedora,rhel,ubuntu | 154 | # Validate the distribution name, or toss an erro |
18 | 155 | # values: darwin,fedora,rhel,ubuntu,debian,opensuse | ||
19 | 155 | function set_VENDOR_DISTRIBUTION () | 156 | function set_VENDOR_DISTRIBUTION () |
20 | 156 | { | 157 | { |
21 | 157 | local dist=`echo "$1" | tr '[A-Z]' '[a-z]'` | 158 | local dist=`echo "$1" | tr '[A-Z]' '[a-z]'` |
22 | @@ -165,9 +166,15 @@ | |||
23 | 165 | rhel) | 166 | rhel) |
24 | 166 | VENDOR_DISTRIBUTION='rhel' | 167 | VENDOR_DISTRIBUTION='rhel' |
25 | 167 | ;; | 168 | ;; |
26 | 169 | debian) | ||
27 | 170 | VENDOR_DISTRIBUTION='debian' | ||
28 | 171 | ;; | ||
29 | 168 | ubuntu) | 172 | ubuntu) |
30 | 169 | VENDOR_DISTRIBUTION='ubuntu' | 173 | VENDOR_DISTRIBUTION='ubuntu' |
31 | 170 | ;; | 174 | ;; |
32 | 175 | suse) | ||
33 | 176 | VENDOR_DISTRIBUTION='opensuse' | ||
34 | 177 | ;; | ||
35 | 171 | opensuse) | 178 | opensuse) |
36 | 172 | VENDOR_DISTRIBUTION='opensuse' | 179 | VENDOR_DISTRIBUTION='opensuse' |
37 | 173 | ;; | 180 | ;; |
38 | @@ -177,21 +184,57 @@ | |||
39 | 177 | esac | 184 | esac |
40 | 178 | } | 185 | } |
41 | 179 | 186 | ||
42 | 187 | # Validate a Vendor's release name/number | ||
43 | 180 | function set_VENDOR_RELEASE () | 188 | function set_VENDOR_RELEASE () |
44 | 181 | { | 189 | { |
45 | 182 | local release=`echo "$1" | tr '[A-Z]' '[a-z]'` | 190 | local release=`echo "$1" | tr '[A-Z]' '[a-z]'` |
47 | 183 | case "$VENDOR_DISTRIBUTION" in | 191 | |
48 | 192 | if $DEBUG; then | ||
49 | 193 | echo "VENDOR_DISTRIBUTION:$VENDOR_DISTRIBUTION" | ||
50 | 194 | echo "VENDOR_RELEASE:$release" | ||
51 | 195 | fi | ||
52 | 196 | |||
53 | 197 | case $VENDOR_DISTRIBUTION in | ||
54 | 184 | darwin) | 198 | darwin) |
56 | 185 | VENDOR_RELEASE='mountain' | 199 | case $release in |
57 | 200 | 10.6*) | ||
58 | 201 | VENDOR_RELEASE='snow_leopard' | ||
59 | 202 | ;; | ||
60 | 203 | 10.7*) | ||
61 | 204 | VENDOR_RELEASE='mountain' | ||
62 | 205 | ;; | ||
63 | 206 | mountain) | ||
64 | 207 | VENDOR_RELEASE='mountain' | ||
65 | 208 | ;; | ||
66 | 209 | 10.8.*) | ||
67 | 210 | echo "mountain_lion" | ||
68 | 211 | VENDOR_RELEASE='mountain_lion' | ||
69 | 212 | ;; | ||
70 | 213 | *) | ||
71 | 214 | echo $VENDOR_RELEASE | ||
72 | 215 | VENDOR_RELEASE='unknown' | ||
73 | 216 | ;; | ||
74 | 217 | esac | ||
75 | 186 | ;; | 218 | ;; |
76 | 187 | fedora) | 219 | fedora) |
77 | 188 | VENDOR_RELEASE="$release" | 220 | VENDOR_RELEASE="$release" |
78 | 221 | if [[ "x$VENDOR_RELEASE" == '18' ]]; then | ||
79 | 222 | VENDOR_RELEASE='sphericalcow' | ||
80 | 223 | fi | ||
81 | 189 | ;; | 224 | ;; |
82 | 190 | rhel) | 225 | rhel) |
83 | 191 | VENDOR_RELEASE="$release" | 226 | VENDOR_RELEASE="$release" |
84 | 192 | ;; | 227 | ;; |
85 | 228 | debian) | ||
86 | 229 | VENDOR_RELEASE="$release" | ||
87 | 230 | ;; | ||
88 | 193 | ubuntu) | 231 | ubuntu) |
89 | 194 | VENDOR_RELEASE="$release" | 232 | VENDOR_RELEASE="$release" |
90 | 233 | if [[ "x$VENDOR_RELEASE" == 'x12.04' ]]; then | ||
91 | 234 | VENDOR_RELEASE="precise" | ||
92 | 235 | elif [[ "x$VENDOR_RELEASE" == 'x12.10' ]]; then | ||
93 | 236 | VENDOR_RELEASE="quantal" | ||
94 | 237 | fi | ||
95 | 195 | ;; | 238 | ;; |
96 | 196 | opensuse) | 239 | opensuse) |
97 | 197 | VENDOR_RELEASE="$release" | 240 | VENDOR_RELEASE="$release" |
98 | @@ -206,7 +249,7 @@ | |||
99 | 206 | } | 249 | } |
100 | 207 | 250 | ||
101 | 208 | 251 | ||
103 | 209 | # Valid values are: apple, redhat, centos, canonical | 252 | # Valid values are: apple, redhat, centos, canonical, oracle, suse |
104 | 210 | function set_VENDOR () | 253 | function set_VENDOR () |
105 | 211 | { | 254 | { |
106 | 212 | local vendor=`echo "$1" | tr '[A-Z]' '[a-z]'` | 255 | local vendor=`echo "$1" | tr '[A-Z]' '[a-z]'` |
107 | @@ -218,12 +261,30 @@ | |||
108 | 218 | redhat) | 261 | redhat) |
109 | 219 | VENDOR='redhat' | 262 | VENDOR='redhat' |
110 | 220 | ;; | 263 | ;; |
111 | 264 | fedora) | ||
112 | 265 | VENDOR='redhat' | ||
113 | 266 | ;; | ||
114 | 267 | redhat-release-server-*) | ||
115 | 268 | VENDOR='redhat' | ||
116 | 269 | ;; | ||
117 | 270 | enterprise-release-*) | ||
118 | 271 | VENDOR='oracle' | ||
119 | 272 | ;; | ||
120 | 221 | centos) | 273 | centos) |
121 | 222 | VENDOR='centos' | 274 | VENDOR='centos' |
122 | 223 | ;; | 275 | ;; |
123 | 224 | canonical) | 276 | canonical) |
124 | 225 | VENDOR='canonical' | 277 | VENDOR='canonical' |
125 | 226 | ;; | 278 | ;; |
126 | 279 | ubuntu) | ||
127 | 280 | VENDOR='canonical' | ||
128 | 281 | ;; | ||
129 | 282 | debian) | ||
130 | 283 | VENDOR='debian' | ||
131 | 284 | ;; | ||
132 | 285 | opensuse) | ||
133 | 286 | VENDOR='suse' | ||
134 | 287 | ;; | ||
135 | 227 | suse) | 288 | suse) |
136 | 228 | VENDOR='suse' | 289 | VENDOR='suse' |
137 | 229 | ;; | 290 | ;; |
138 | @@ -234,6 +295,27 @@ | |||
139 | 234 | 295 | ||
140 | 235 | set_VENDOR_DISTRIBUTION $2 | 296 | set_VENDOR_DISTRIBUTION $2 |
141 | 236 | set_VENDOR_RELEASE $3 | 297 | set_VENDOR_RELEASE $3 |
142 | 298 | |||
143 | 299 | # Set which vendor/versions we trust for autoreconf | ||
144 | 300 | case $VENDOR_DISTRIBUTION in | ||
145 | 301 | fedora) | ||
146 | 302 | if [[ "x$VENDOR_RELEASE" == 'x18' ]]; then | ||
147 | 303 | AUTORECONF_REBUILD_HOST=true | ||
148 | 304 | elif [[ "x$VENDOR_RELEASE" == 'xsphericalcow' ]]; then | ||
149 | 305 | AUTORECONF_REBUILD_HOST=true | ||
150 | 306 | elif [[ "x$VENDOR_RELEASE" == 'x19' ]]; then | ||
151 | 307 | AUTORECONF_REBUILD_HOST=true | ||
152 | 308 | fi | ||
153 | 309 | ;; | ||
154 | 310 | canonical) | ||
155 | 311 | if [[ "x$VENDOR_RELEASE" == 'xprecise' ]]; then | ||
156 | 312 | AUTORECONF_REBUILD_HOST=true | ||
157 | 313 | elif [[ "x$VENDOR_RELEASE" == 'xquantal' ]]; then | ||
158 | 314 | AUTORECONF_REBUILD_HOST=true | ||
159 | 315 | fi | ||
160 | 316 | ;; | ||
161 | 317 | esac | ||
162 | 318 | |||
163 | 237 | } | 319 | } |
164 | 238 | 320 | ||
165 | 239 | function determine_target_platform () | 321 | function determine_target_platform () |
166 | @@ -242,14 +324,14 @@ | |||
167 | 242 | UNAME_KERNEL=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | 324 | UNAME_KERNEL=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
168 | 243 | UNAME_KERNEL_RELEASE=`(uname -r) 2>/dev/null` || UNAME_KERNEL_RELEASE=unknown | 325 | UNAME_KERNEL_RELEASE=`(uname -r) 2>/dev/null` || UNAME_KERNEL_RELEASE=unknown |
169 | 244 | 326 | ||
171 | 245 | if [[ $(uname) == 'Darwin' ]]; then | 327 | if [[ -x '/usr/bin/sw_vers' ]]; then |
172 | 328 | local _VERSION=`/usr/bin/sw_vers -productVersion` | ||
173 | 329 | set_VENDOR 'apple' 'darwin' $_VERSION | ||
174 | 330 | elif [[ $(uname) == 'Darwin' ]]; then | ||
175 | 246 | set_VENDOR 'apple' 'darwin' 'mountain' | 331 | set_VENDOR 'apple' 'darwin' 'mountain' |
176 | 247 | elif [[ -f '/etc/fedora-release' ]]; then | 332 | elif [[ -f '/etc/fedora-release' ]]; then |
177 | 248 | local fedora_version=`cat /etc/fedora-release | awk ' { print $3 } '` | 333 | local fedora_version=`cat /etc/fedora-release | awk ' { print $3 } '` |
178 | 249 | set_VENDOR 'redhat' 'fedora' $fedora_version | 334 | set_VENDOR 'redhat' 'fedora' $fedora_version |
179 | 250 | if [[ "x$VENDOR_RELEASE" == 'x17' ]]; then | ||
180 | 251 | AUTORECONF_REBUILD_HOST=true | ||
181 | 252 | fi | ||
182 | 253 | elif [[ -f '/etc/centos-release' ]]; then | 335 | elif [[ -f '/etc/centos-release' ]]; then |
183 | 254 | local centos_version=`cat /etc/centos-release | awk ' { print $7 } '` | 336 | local centos_version=`cat /etc/centos-release | awk ' { print $7 } '` |
184 | 255 | set_VENDOR 'centos' 'rhel' $centos_version | 337 | set_VENDOR 'centos' 'rhel' $centos_version |
185 | @@ -259,14 +341,18 @@ | |||
186 | 259 | set_VENDOR 'suse' $suse_distribution $suse_version | 341 | set_VENDOR 'suse' $suse_distribution $suse_version |
187 | 260 | elif [[ -f '/etc/redhat-release' ]]; then | 342 | elif [[ -f '/etc/redhat-release' ]]; then |
188 | 261 | local rhel_version=`cat /etc/redhat-release | awk ' { print $7 } '` | 343 | local rhel_version=`cat /etc/redhat-release | awk ' { print $7 } '` |
190 | 262 | set_VENDOR 'redhat' 'rhel' $rhel_version | 344 | local _vendor=`rpm -qf /etc/redhat-release` |
191 | 345 | set_VENDOR $_vendor 'rhel' $rhel_version | ||
192 | 346 | elif [[ -f '/etc/os-release' ]]; then | ||
193 | 347 | source '/etc/os-release' | ||
194 | 348 | set_VENDOR $ID $ID $VERSION_ID | ||
195 | 349 | elif [[ -x '/usr/bin/lsb_release' ]]; then | ||
196 | 350 | local _ID=`/usr/bin/lsb_release -s -i` | ||
197 | 351 | local _VERSION=`/usr/bin/lsb_release -s -r` | ||
198 | 352 | set_VENDOR $_ID $_ID $_VERSION_ID | ||
199 | 263 | elif [[ -f '/etc/lsb-release' ]]; then | 353 | elif [[ -f '/etc/lsb-release' ]]; then |
206 | 264 | local debian_DISTRIB_ID=`cat /etc/lsb-release | grep DISTRIB_ID | awk -F= ' { print $2 } '` | 354 | source '/etc/lsb-release' |
207 | 265 | local debian_version=`cat /etc/lsb-release | grep DISTRIB_CODENAME | awk -F= ' { print $2 } '` | 355 | set_VENDOR 'canonical' $DISTRIB_ID $DISTRIB_CODENAME |
202 | 266 | set_VENDOR 'canonical' $debian_DISTRIB_ID $debian_version | ||
203 | 267 | if [[ "x$VENDOR_RELEASE" == 'xprecise' ]]; then | ||
204 | 268 | AUTORECONF_REBUILD_HOST=true | ||
205 | 269 | fi | ||
208 | 270 | fi | 356 | fi |
209 | 271 | 357 | ||
210 | 272 | rebuild_host_os | 358 | rebuild_host_os |
211 | @@ -296,42 +382,48 @@ | |||
212 | 296 | # Arguments for configure | 382 | # Arguments for configure |
213 | 297 | local BUILD_CONFIGURE_ARG= | 383 | local BUILD_CONFIGURE_ARG= |
214 | 298 | 384 | ||
225 | 299 | # Set ENV DEBUG in order to enable debugging | 385 | # If ENV DEBUG is set we enable both debug and asssert, otherwise we see if this is a VCS checkout and if so enable assert |
226 | 300 | if $DEBUG; then | 386 | # Set ENV ASSERT in order to enable assert. |
227 | 301 | BUILD_CONFIGURE_ARG='--enable-debug' | 387 | # If we are doing a valgrind run, we always compile with assert disabled |
228 | 302 | fi | 388 | if $valgrind_run; then |
229 | 303 | 389 | BUILD_CONFIGURE_ARG+= " CXXFLAGS=-DNDEBUG " | |
230 | 304 | # Set ENV ASSERT in order to enable assert | 390 | BUILD_CONFIGURE_ARG+= " CFLAGS=-DNDEBUG " |
231 | 305 | if [[ -n "$ASSERT" ]]; then | 391 | else |
232 | 306 | local ASSERT_ARG= | 392 | if $DEBUG; then |
233 | 307 | ASSERT_ARG='--enable-assert' | 393 | BUILD_CONFIGURE_ARG+=' --enable-debug --enable-assert' |
234 | 308 | BUILD_CONFIGURE_ARG="$ASSERT_ARG $BUILD_CONFIGURE_ARG" | 394 | elif [[ -n "$VCS_CHECKOUT" ]]; then |
235 | 395 | BUILD_CONFIGURE_ARG+=' --enable-assert' | ||
236 | 396 | fi | ||
237 | 309 | fi | 397 | fi |
238 | 310 | 398 | ||
239 | 311 | if [[ -n "$CONFIGURE_ARG" ]]; then | 399 | if [[ -n "$CONFIGURE_ARG" ]]; then |
241 | 312 | BUILD_CONFIGURE_ARG= "$BUILD_CONFIGURE_ARG $CONFIGURE_ARG" | 400 | BUILD_CONFIGURE_ARG+=" $CONFIGURE_ARG" |
242 | 401 | fi | ||
243 | 402 | |||
244 | 403 | if [[ -n "$PREFIX_ARG" ]]; then | ||
245 | 404 | BUILD_CONFIGURE_ARG+=" $PREFIX_ARG" | ||
246 | 313 | fi | 405 | fi |
247 | 314 | 406 | ||
248 | 315 | ret=1; | 407 | ret=1; |
249 | 316 | # If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV | 408 | # If we are executing on OSX use CLANG, otherwise only use it if we find it in the ENV |
250 | 317 | case $HOST_OS in | 409 | case $HOST_OS in |
251 | 318 | *-darwin-*) | 410 | *-darwin-*) |
253 | 319 | CC=clang CXX=clang++ $top_srcdir/configure $BUILD_CONFIGURE_ARG || die "Cannot execute CC=clang CXX=clang++ configure $BUILD_CONFIGURE_ARG $PREFIX_ARG" | 411 | CC=clang CXX=clang++ $top_srcdir/configure $BUILD_CONFIGURE_ARG || die "Cannot execute CC=clang CXX=clang++ configure $BUILD_CONFIGURE_ARG" |
254 | 320 | ret=$? | 412 | ret=$? |
255 | 321 | ;; | 413 | ;; |
256 | 322 | rhel-5*) | 414 | rhel-5*) |
257 | 323 | command_exists 'gcc44' || die "Could not locate gcc44" | 415 | command_exists 'gcc44' || die "Could not locate gcc44" |
259 | 324 | CC=gcc44 CXX=gcc44 $top_srcdir/configure $BUILD_CONFIGURE_ARG $PREFIX_ARG || die "Cannot execute CC=gcc44 CXX=gcc44 configure $BUILD_CONFIGURE_ARG $PREFIX_ARG" | 416 | CC=gcc44 CXX=gcc44 $top_srcdir/configure $BUILD_CONFIGURE_ARG || die "Cannot execute CC=gcc44 CXX=gcc44 configure $BUILD_CONFIGURE_ARG" |
260 | 325 | ret=$? | 417 | ret=$? |
261 | 326 | ;; | 418 | ;; |
262 | 327 | *) | 419 | *) |
264 | 328 | $CONFIGURE $BUILD_CONFIGURE_ARG $PREFIX_ARG | 420 | $CONFIGURE $BUILD_CONFIGURE_ARG |
265 | 329 | ret=$? | 421 | ret=$? |
266 | 330 | ;; | 422 | ;; |
267 | 331 | esac | 423 | esac |
268 | 332 | 424 | ||
269 | 333 | if [ $ret -ne 0 ]; then | 425 | if [ $ret -ne 0 ]; then |
271 | 334 | die "Could not execute $CONFIGURE $BUILD_CONFIGURE_ARG $PREFIX_ARG" | 426 | die "Could not execute $CONFIGURE $BUILD_CONFIGURE_ARG" |
272 | 335 | fi | 427 | fi |
273 | 336 | 428 | ||
274 | 337 | if [ ! -f 'Makefile' ]; then | 429 | if [ ! -f 'Makefile' ]; then |
275 | @@ -353,7 +445,7 @@ | |||
276 | 353 | function setup_valgrind_command () { | 445 | function setup_valgrind_command () { |
277 | 354 | VALGRIND_PROGRAM=`type -p valgrind` | 446 | VALGRIND_PROGRAM=`type -p valgrind` |
278 | 355 | if [[ -n "$VALGRIND_PROGRAM" ]]; then | 447 | if [[ -n "$VALGRIND_PROGRAM" ]]; then |
280 | 356 | VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE" | 448 | VALGRIND_COMMAND="$VALGRIND_PROGRAM --error-exitcode=1 --leak-check=yes --malloc-fill=A5 --free-fill=DE --xml=yes --xml-file=\"valgrind-%p.xml\"" |
281 | 357 | fi | 449 | fi |
282 | 358 | } | 450 | } |
283 | 359 | 451 | ||
284 | @@ -367,6 +459,10 @@ | |||
285 | 367 | die "OLD_CONFIGURE_ARG($OLD_CONFIGURE_ARG) was set on push, programmer error!" | 459 | die "OLD_CONFIGURE_ARG($OLD_CONFIGURE_ARG) was set on push, programmer error!" |
286 | 368 | fi | 460 | fi |
287 | 369 | 461 | ||
288 | 462 | if [[ -n "$OLD_PREFIX" ]]; then | ||
289 | 463 | die "OLD_PREFIX($OLD_PREFIX) was set on push, programmer error!" | ||
290 | 464 | fi | ||
291 | 465 | |||
292 | 370 | if [[ -n "$OLD_MAKE" ]]; then | 466 | if [[ -n "$OLD_MAKE" ]]; then |
293 | 371 | die "OLD_MAKE($OLD_MAKE) was set on push, programmer error!" | 467 | die "OLD_MAKE($OLD_MAKE) was set on push, programmer error!" |
294 | 372 | fi | 468 | fi |
295 | @@ -402,6 +498,10 @@ | |||
296 | 402 | CONFIGURE_ARG=$OLD_CONFIGURE_ARG | 498 | CONFIGURE_ARG=$OLD_CONFIGURE_ARG |
297 | 403 | fi | 499 | fi |
298 | 404 | 500 | ||
299 | 501 | if [[ -n "$OLD_PREFIX" ]]; then | ||
300 | 502 | PREFIX_ARG=$OLD_PREFIX | ||
301 | 503 | fi | ||
302 | 504 | |||
303 | 405 | if [[ -n "$OLD_MAKE" ]]; then | 505 | if [[ -n "$OLD_MAKE" ]]; then |
304 | 406 | MAKE=$OLD_MAKE | 506 | MAKE=$OLD_MAKE |
305 | 407 | fi | 507 | fi |
306 | @@ -412,56 +512,11 @@ | |||
307 | 412 | 512 | ||
308 | 413 | OLD_CONFIGURE= | 513 | OLD_CONFIGURE= |
309 | 414 | OLD_CONFIGURE_ARG= | 514 | OLD_CONFIGURE_ARG= |
310 | 515 | OLD_PREFIX= | ||
311 | 415 | OLD_MAKE= | 516 | OLD_MAKE= |
312 | 416 | OLD_TESTS_ENVIRONMENT= | 517 | OLD_TESTS_ENVIRONMENT= |
361 | 417 | echo "reset happened" | 518 | |
362 | 418 | } | 519 | export -n CC CXX |
315 | 419 | |||
316 | 420 | function push_PREFIX_ARG () | ||
317 | 421 | { | ||
318 | 422 | if [[ -n "$OLD_PREFIX_ARG" ]]; then | ||
319 | 423 | die "OLD_PREFIX_ARG was set on push, programmer error!" | ||
320 | 424 | fi | ||
321 | 425 | |||
322 | 426 | if [[ -n "$PREFIX_ARG" ]]; then | ||
323 | 427 | OLD_PREFIX_ARG=$PREFIX_ARG | ||
324 | 428 | PREFIX_ARG= | ||
325 | 429 | fi | ||
326 | 430 | |||
327 | 431 | if [[ -n "$1" ]]; then | ||
328 | 432 | PREFIX_ARG="--prefix=$1" | ||
329 | 433 | fi | ||
330 | 434 | } | ||
331 | 435 | |||
332 | 436 | function pop_PREFIX_ARG () | ||
333 | 437 | { | ||
334 | 438 | if [[ -n "$OLD_PREFIX_ARG" ]]; then | ||
335 | 439 | PREFIX_ARG=$OLD_PREFIX_ARG | ||
336 | 440 | OLD_PREFIX_ARG= | ||
337 | 441 | else | ||
338 | 442 | PREFIX_ARG= | ||
339 | 443 | fi | ||
340 | 444 | } | ||
341 | 445 | |||
342 | 446 | function push_TESTS_ENVIRONMENT () | ||
343 | 447 | { | ||
344 | 448 | if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then | ||
345 | 449 | die "OLD_TESTS_ENVIRONMENT was set on push, programmer error!" | ||
346 | 450 | fi | ||
347 | 451 | |||
348 | 452 | if [[ -n "$TESTS_ENVIRONMENT" ]]; then | ||
349 | 453 | OLD_TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT | ||
350 | 454 | TESTS_ENVIRONMENT= | ||
351 | 455 | fi | ||
352 | 456 | } | ||
353 | 457 | |||
354 | 458 | function pop_TESTS_ENVIRONMENT () | ||
355 | 459 | { | ||
356 | 460 | TESTS_ENVIRONMENT= | ||
357 | 461 | if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then | ||
358 | 462 | TESTS_ENVIRONMENT=$OLD_TESTS_ENVIRONMENT | ||
359 | 463 | OLD_TESTS_ENVIRONMENT= | ||
360 | 464 | fi | ||
363 | 465 | } | 520 | } |
364 | 466 | 521 | ||
365 | 467 | function safe_pushd () | 522 | function safe_pushd () |
366 | @@ -490,11 +545,6 @@ | |||
367 | 490 | 545 | ||
368 | 491 | function make_valgrind () | 546 | function make_valgrind () |
369 | 492 | { | 547 | { |
370 | 493 | if [[ "$VENDOR_DISTRIBUTION" == 'darwin' ]]; then | ||
371 | 494 | make_darwin_malloc | ||
372 | 495 | return | ||
373 | 496 | fi | ||
374 | 497 | |||
375 | 498 | # If the env VALGRIND_COMMAND is set then we assume it is valid | 548 | # If the env VALGRIND_COMMAND is set then we assume it is valid |
376 | 499 | local valgrind_was_set=false | 549 | local valgrind_was_set=false |
377 | 500 | if [[ -z "$VALGRIND_COMMAND" ]]; then | 550 | if [[ -z "$VALGRIND_COMMAND" ]]; then |
378 | @@ -512,10 +562,12 @@ | |||
379 | 512 | return 1 | 562 | return 1 |
380 | 513 | fi | 563 | fi |
381 | 514 | 564 | ||
382 | 565 | save_BUILD | ||
383 | 566 | |||
384 | 567 | valgrind_run=true | ||
385 | 568 | |||
386 | 515 | # If we are required to run configure, do so now | 569 | # If we are required to run configure, do so now |
390 | 516 | run_configure_if_required | 570 | run_configure |
388 | 517 | |||
389 | 518 | push_TESTS_ENVIRONMENT | ||
391 | 519 | 571 | ||
392 | 520 | # If we don't have a configure, then most likely we will be missing libtool | 572 | # If we don't have a configure, then most likely we will be missing libtool |
393 | 521 | assert_file 'configure' | 573 | assert_file 'configure' |
394 | @@ -525,15 +577,29 @@ | |||
395 | 525 | TESTS_ENVIRONMENT="$VALGRIND_COMMAND" | 577 | TESTS_ENVIRONMENT="$VALGRIND_COMMAND" |
396 | 526 | fi | 578 | fi |
397 | 527 | 579 | ||
401 | 528 | make_target 'check' || return 1 | 580 | make_target 'check' |
402 | 529 | 581 | ret=$? | |
403 | 530 | pop_TESTS_ENVIRONMENT | 582 | |
404 | 583 | # If we aren't going to error, we will clean up our environment | ||
405 | 584 | if [ "$ret" -eq 0 ]; then | ||
406 | 585 | make 'distclean' | ||
407 | 586 | fi | ||
408 | 587 | |||
409 | 588 | valgrind_run=false | ||
410 | 589 | |||
411 | 590 | restore_BUILD | ||
412 | 591 | |||
413 | 592 | if [ "$ret" -ne 0 ]; then | ||
414 | 593 | return 1 | ||
415 | 594 | fi | ||
416 | 531 | } | 595 | } |
417 | 532 | 596 | ||
418 | 533 | function make_install_system () | 597 | function make_install_system () |
419 | 534 | { | 598 | { |
420 | 535 | local INSTALL_LOCATION=$(mktemp -d /tmp/XXXXXXXXXX) | 599 | local INSTALL_LOCATION=$(mktemp -d /tmp/XXXXXXXXXX) |
422 | 536 | push_PREFIX_ARG $INSTALL_LOCATION | 600 | |
423 | 601 | save_BUILD | ||
424 | 602 | PREFIX_ARG="--prefix=$INSTALL_LOCATION" | ||
425 | 537 | 603 | ||
426 | 538 | if [ ! -d $INSTALL_LOCATION ] ; then | 604 | if [ ! -d $INSTALL_LOCATION ] ; then |
427 | 539 | die "ASSERT temp directory not found '$INSTALL_LOCATION'" | 605 | die "ASSERT temp directory not found '$INSTALL_LOCATION'" |
428 | @@ -541,17 +607,12 @@ | |||
429 | 541 | 607 | ||
430 | 542 | run_configure #install_buid_dir | 608 | run_configure #install_buid_dir |
431 | 543 | 609 | ||
432 | 544 | push_TESTS_ENVIRONMENT | ||
433 | 545 | |||
434 | 546 | make_target 'install' | 610 | make_target 'install' |
435 | 547 | 611 | ||
436 | 548 | make_target 'installcheck' | 612 | make_target 'installcheck' |
437 | 549 | 613 | ||
438 | 550 | make_target 'uninstall' | 614 | make_target 'uninstall' |
439 | 551 | 615 | ||
440 | 552 | pop_TESTS_ENVIRONMENT | ||
441 | 553 | pop_PREFIX_ARG | ||
442 | 554 | |||
443 | 555 | rm -r -f $INSTALL_LOCATION | 616 | rm -r -f $INSTALL_LOCATION |
444 | 556 | make 'distclean' | 617 | make 'distclean' |
445 | 557 | 618 | ||
446 | @@ -559,6 +620,7 @@ | |||
447 | 559 | die "ASSERT Makefile should not exist" | 620 | die "ASSERT Makefile should not exist" |
448 | 560 | fi | 621 | fi |
449 | 561 | 622 | ||
450 | 623 | restore_BUILD | ||
451 | 562 | safe_popd | 624 | safe_popd |
452 | 563 | } | 625 | } |
453 | 564 | 626 | ||
454 | @@ -625,7 +687,29 @@ | |||
455 | 625 | return 0 | 687 | return 0 |
456 | 626 | } | 688 | } |
457 | 627 | 689 | ||
459 | 628 | function make_skeleton_mingw () | 690 | function check_clang () |
460 | 691 | { | ||
461 | 692 | command_exists 'clang' | ||
462 | 693 | ret=$? | ||
463 | 694 | if [ "$ret" -ne 0 ]; then | ||
464 | 695 | return 1 | ||
465 | 696 | fi | ||
466 | 697 | |||
467 | 698 | return 0 | ||
468 | 699 | } | ||
469 | 700 | |||
470 | 701 | function check_clang_analyzer () | ||
471 | 702 | { | ||
472 | 703 | command_exists 'scan-build' | ||
473 | 704 | ret=$? | ||
474 | 705 | if [ "$ret" -ne 0 ]; then | ||
475 | 706 | return 1 | ||
476 | 707 | fi | ||
477 | 708 | |||
478 | 709 | return 0 | ||
479 | 710 | } | ||
480 | 711 | |||
481 | 712 | function make_skeleton () | ||
482 | 629 | { | 713 | { |
483 | 630 | run_configure | 714 | run_configure |
484 | 631 | ret=$? | 715 | ret=$? |
485 | @@ -642,8 +726,6 @@ | |||
486 | 642 | if command_exists 'wine'; then | 726 | if command_exists 'wine'; then |
487 | 643 | TESTS_ENVIRONMENT='wine' | 727 | TESTS_ENVIRONMENT='wine' |
488 | 644 | fi | 728 | fi |
489 | 645 | elif command_exists 'wineconsole'; then | ||
490 | 646 | TESTS_ENVIRONMENT='wineconsole --backend=curses' | ||
491 | 647 | fi | 729 | fi |
492 | 648 | 730 | ||
493 | 649 | if [[ -n "$TESTS_ENVIRONMENT" ]]; then | 731 | if [[ -n "$TESTS_ENVIRONMENT" ]]; then |
494 | @@ -662,9 +744,8 @@ | |||
495 | 662 | 744 | ||
496 | 663 | function make_for_mingw () | 745 | function make_for_mingw () |
497 | 664 | { | 746 | { |
498 | 665 | check_mingw | ||
499 | 666 | if ! check_mingw; then | 747 | if ! check_mingw; then |
501 | 667 | die 'mingw64 tools were not found' | 748 | return 1 |
502 | 668 | fi | 749 | fi |
503 | 669 | 750 | ||
504 | 670 | # Make sure it is clean | 751 | # Make sure it is clean |
505 | @@ -678,10 +759,73 @@ | |||
506 | 678 | 759 | ||
507 | 679 | CONFIGURE='mingw64-configure' | 760 | CONFIGURE='mingw64-configure' |
508 | 680 | MAKE='mingw64-make' | 761 | MAKE='mingw64-make' |
513 | 681 | CONFIGURE_ARGS='--enable-static' | 762 | CONFIGURE_ARGS='--enable-static --disable-shared' |
514 | 682 | 763 | ||
515 | 683 | make_skeleton_mingw | 764 | make_skeleton |
516 | 684 | ret=$? | 765 | ret=$? |
517 | 766 | |||
518 | 767 | restore_BUILD | ||
519 | 768 | |||
520 | 769 | return $ret | ||
521 | 770 | } | ||
522 | 771 | |||
523 | 772 | function make_for_clang () | ||
524 | 773 | { | ||
525 | 774 | if ! check_clang; then | ||
526 | 775 | return 1 | ||
527 | 776 | fi | ||
528 | 777 | |||
529 | 778 | # Make sure it is clean | ||
530 | 779 | if [ -f Makefile -o -f configure ]; then | ||
531 | 780 | make_maintainer_clean | ||
532 | 781 | fi | ||
533 | 782 | |||
534 | 783 | run_autoreconf | ||
535 | 784 | |||
536 | 785 | save_BUILD | ||
537 | 786 | |||
538 | 787 | CC=clang CXX=clang++ | ||
539 | 788 | export CC CXX | ||
540 | 789 | |||
541 | 790 | make_skeleton | ||
542 | 791 | ret=$? | ||
543 | 792 | |||
544 | 793 | make_target 'check' | ||
545 | 794 | |||
546 | 795 | restore_BUILD | ||
547 | 796 | |||
548 | 797 | return $ret | ||
549 | 798 | } | ||
550 | 799 | |||
551 | 800 | function make_for_clang_analyzer () | ||
552 | 801 | { | ||
553 | 802 | if ! check_clang; then | ||
554 | 803 | return 1 | ||
555 | 804 | fi | ||
556 | 805 | |||
557 | 806 | if ! check_clang_analyzer; then | ||
558 | 807 | die 'clang-analyzer was not found' | ||
559 | 808 | fi | ||
560 | 809 | |||
561 | 810 | # Make sure it is clean | ||
562 | 811 | if [ -f Makefile -o -f configure ]; then | ||
563 | 812 | make_maintainer_clean | ||
564 | 813 | fi | ||
565 | 814 | |||
566 | 815 | run_autoreconf | ||
567 | 816 | |||
568 | 817 | save_BUILD | ||
569 | 818 | |||
570 | 819 | CC=clang CXX=clang++ | ||
571 | 820 | export CC CXX | ||
572 | 821 | CONFIGURE_ARGS='--enable-debug' | ||
573 | 822 | |||
574 | 823 | make_skeleton | ||
575 | 824 | ret=$? | ||
576 | 825 | |||
577 | 826 | make_target 'clean' 'warn' | ||
578 | 827 | |||
579 | 828 | scan-build -o clang-html make -j4 -k | ||
580 | 685 | 829 | ||
581 | 686 | restore_BUILD | 830 | restore_BUILD |
582 | 687 | 831 | ||
583 | @@ -710,6 +854,8 @@ | |||
584 | 710 | make_valgrind | 854 | make_valgrind |
585 | 711 | make_gdb | 855 | make_gdb |
586 | 712 | make_rpm | 856 | make_rpm |
587 | 857 | make_for_clang | ||
588 | 858 | make_for_clang_analyzer | ||
589 | 713 | 859 | ||
590 | 714 | if [ check_mingw -eq 0 ]; then | 860 | if [ check_mingw -eq 0 ]; then |
591 | 715 | make_for_mingw | 861 | make_for_mingw |
592 | @@ -815,11 +961,11 @@ | |||
593 | 815 | 961 | ||
594 | 816 | function make_gdb () | 962 | function make_gdb () |
595 | 817 | { | 963 | { |
596 | 964 | save_BUILD | ||
597 | 965 | |||
598 | 818 | if command_exists 'gdb'; then | 966 | if command_exists 'gdb'; then |
599 | 819 | run_configure_if_required | 967 | run_configure_if_required |
600 | 820 | 968 | ||
601 | 821 | push_TESTS_ENVIRONMENT | ||
602 | 822 | |||
603 | 823 | # Set ENV GDB_COMMAND | 969 | # Set ENV GDB_COMMAND |
604 | 824 | if [[ -z "$GDB_COMMAND" ]]; then | 970 | if [[ -z "$GDB_COMMAND" ]]; then |
605 | 825 | setup_gdb_command | 971 | setup_gdb_command |
606 | @@ -839,8 +985,6 @@ | |||
607 | 839 | rm 'gdb.txt' | 985 | rm 'gdb.txt' |
608 | 840 | fi | 986 | fi |
609 | 841 | 987 | ||
610 | 842 | pop_TESTS_ENVIRONMENT | ||
611 | 843 | |||
612 | 844 | if [ -f '.gdb_history' ]; then | 988 | if [ -f '.gdb_history' ]; then |
613 | 845 | rm '.gdb_history' | 989 | rm '.gdb_history' |
614 | 846 | fi | 990 | fi |
615 | @@ -852,6 +996,8 @@ | |||
616 | 852 | echo 'gdb was not present' | 996 | echo 'gdb was not present' |
617 | 853 | return 1 | 997 | return 1 |
618 | 854 | fi | 998 | fi |
619 | 999 | |||
620 | 1000 | restore_BUILD | ||
621 | 855 | } | 1001 | } |
622 | 856 | 1002 | ||
623 | 857 | # $1 target to compile | 1003 | # $1 target to compile |
624 | @@ -883,9 +1029,9 @@ | |||
625 | 883 | 1029 | ||
626 | 884 | if [ $ret -ne 0 ]; then | 1030 | if [ $ret -ne 0 ]; then |
627 | 885 | if [ -n "$2" ]; then | 1031 | if [ -n "$2" ]; then |
629 | 886 | warn "Cannot execute $MAKE $1: $ret" | 1032 | warn "Failed to execute $MAKE $1: $ret" |
630 | 887 | else | 1033 | else |
632 | 888 | die "Cannot execute $MAKE $1: $ret" | 1034 | die "Failed to execute $MAKE $1: $ret" |
633 | 889 | fi | 1035 | fi |
634 | 890 | fi | 1036 | fi |
635 | 891 | 1037 | ||
636 | @@ -951,6 +1097,13 @@ | |||
637 | 951 | assert_file 'Makefile' 'configure did not produce a Makefile' | 1097 | assert_file 'Makefile' 'configure did not produce a Makefile' |
638 | 952 | } | 1098 | } |
639 | 953 | 1099 | ||
640 | 1100 | function run_make_maintainer_clean_if_possible () | ||
641 | 1101 | { | ||
642 | 1102 | if [ -f 'Makefile' ]; then | ||
643 | 1103 | make_maintainer_clean | ||
644 | 1104 | fi | ||
645 | 1105 | } | ||
646 | 1106 | |||
647 | 954 | function run_autoreconf_if_required () | 1107 | function run_autoreconf_if_required () |
648 | 955 | { | 1108 | { |
649 | 956 | if [ ! -x 'configure' ]; then | 1109 | if [ ! -x 'configure' ]; then |
650 | @@ -958,6 +1111,7 @@ | |||
651 | 958 | fi | 1111 | fi |
652 | 959 | 1112 | ||
653 | 960 | assert_exec_file 'configure' | 1113 | assert_exec_file 'configure' |
654 | 1114 | bash -n configure | ||
655 | 961 | } | 1115 | } |
656 | 962 | 1116 | ||
657 | 963 | function run_autoreconf () | 1117 | function run_autoreconf () |
658 | @@ -971,7 +1125,7 @@ | |||
659 | 971 | run $BOOTSTRAP_LIBTOOLIZE '--copy' '--install' '--force' || die "Cannot execute $BOOTSTRAP_LIBTOOLIZE" | 1125 | run $BOOTSTRAP_LIBTOOLIZE '--copy' '--install' '--force' || die "Cannot execute $BOOTSTRAP_LIBTOOLIZE" |
660 | 972 | fi | 1126 | fi |
661 | 973 | 1127 | ||
663 | 974 | run $AUTORECONF || die "Cannot execute $AUTORECONF" | 1128 | run $AUTORECONF $AUTORECONF_ARGS || die "Cannot execute $AUTORECONF" |
664 | 975 | 1129 | ||
665 | 976 | eval 'bash -n configure' || die "autoreconf generated a malformed configure" | 1130 | eval 'bash -n configure' || die "autoreconf generated a malformed configure" |
666 | 977 | } | 1131 | } |
667 | @@ -1023,6 +1177,14 @@ | |||
668 | 1023 | ;; | 1177 | ;; |
669 | 1024 | h) # help | 1178 | h) # help |
670 | 1025 | echo "bootstrap.sh [options] optional_target ..." | 1179 | echo "bootstrap.sh [options] optional_target ..." |
671 | 1180 | echo " -a # Just run autoreconf"; | ||
672 | 1181 | echo " -p # Print ENV"; | ||
673 | 1182 | echo " -c # Just run configure"; | ||
674 | 1183 | echo " -m # Just run maintainer-clean"; | ||
675 | 1184 | echo " -t # Make target"; | ||
676 | 1185 | echo " -d # Enable debug"; | ||
677 | 1186 | echo " -h # Show help"; | ||
678 | 1187 | echo " -v # Be more verbose in output"; | ||
679 | 1026 | exit | 1188 | exit |
680 | 1027 | ;; | 1189 | ;; |
681 | 1028 | v) # verbose | 1190 | v) # verbose |
682 | @@ -1057,6 +1219,8 @@ | |||
683 | 1057 | VCS_CHECKOUT=svn | 1219 | VCS_CHECKOUT=svn |
684 | 1058 | elif [[ -d '.hg' ]]; then | 1220 | elif [[ -d '.hg' ]]; then |
685 | 1059 | VCS_CHECKOUT=hg | 1221 | VCS_CHECKOUT=hg |
686 | 1222 | else | ||
687 | 1223 | VCS_CHECKOUT= | ||
688 | 1060 | fi | 1224 | fi |
689 | 1061 | 1225 | ||
690 | 1062 | if [[ -n "$VCS_CHECKOUT" ]]; then | 1226 | if [[ -n "$VCS_CHECKOUT" ]]; then |
691 | @@ -1122,6 +1286,7 @@ | |||
692 | 1122 | 1286 | ||
693 | 1123 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1287 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
694 | 1124 | echo "Couldn't find user supplied libtoolize, it is required" | 1288 | echo "Couldn't find user supplied libtoolize, it is required" |
695 | 1289 | return 1 | ||
696 | 1125 | fi | 1290 | fi |
697 | 1126 | else | 1291 | else |
698 | 1127 | # If we are using OSX, we first check to see glibtoolize is available | 1292 | # If we are using OSX, we first check to see glibtoolize is available |
699 | @@ -1130,21 +1295,27 @@ | |||
700 | 1130 | 1295 | ||
701 | 1131 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1296 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
702 | 1132 | echo "Couldn't find glibtoolize, it is required on OSX" | 1297 | echo "Couldn't find glibtoolize, it is required on OSX" |
703 | 1298 | return 1 | ||
704 | 1133 | fi | 1299 | fi |
705 | 1134 | else | 1300 | else |
706 | 1135 | BOOTSTRAP_LIBTOOLIZE=`type -p libtoolize` | 1301 | BOOTSTRAP_LIBTOOLIZE=`type -p libtoolize` |
707 | 1136 | 1302 | ||
708 | 1137 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then | 1303 | if [[ -z "$BOOTSTRAP_LIBTOOLIZE" ]]; then |
709 | 1138 | echo "Couldn't find libtoolize, it is required" | 1304 | echo "Couldn't find libtoolize, it is required" |
710 | 1305 | return 1 | ||
711 | 1139 | fi | 1306 | fi |
712 | 1140 | fi | 1307 | fi |
713 | 1141 | fi | 1308 | fi |
714 | 1309 | |||
715 | 1142 | if $VERBOSE; then | 1310 | if $VERBOSE; then |
716 | 1143 | LIBTOOLIZE_OPTIONS="--verbose $BOOTSTRAP_LIBTOOLIZE_OPTIONS" | 1311 | LIBTOOLIZE_OPTIONS="--verbose $BOOTSTRAP_LIBTOOLIZE_OPTIONS" |
717 | 1144 | fi | 1312 | fi |
718 | 1313 | |||
719 | 1145 | if $DEBUG; then | 1314 | if $DEBUG; then |
720 | 1146 | LIBTOOLIZE_OPTIONS="--debug $BOOTSTRAP_LIBTOOLIZE_OPTIONS" | 1315 | LIBTOOLIZE_OPTIONS="--debug $BOOTSTRAP_LIBTOOLIZE_OPTIONS" |
721 | 1147 | fi | 1316 | fi |
722 | 1317 | |||
723 | 1318 | # Here we set LIBTOOLIZE to true since we are going to invoke it via BOOTSTRAP_LIBTOOLIZE | ||
724 | 1148 | LIBTOOLIZE=true | 1319 | LIBTOOLIZE=true |
725 | 1149 | fi | 1320 | fi |
726 | 1150 | 1321 | ||
727 | @@ -1182,7 +1353,7 @@ | |||
728 | 1182 | fi | 1353 | fi |
729 | 1183 | 1354 | ||
730 | 1184 | if [[ -n "$GNU_BUILD_FLAGS" ]]; then | 1355 | if [[ -n "$GNU_BUILD_FLAGS" ]]; then |
732 | 1185 | AUTORECONF="$AUTORECONF $GNU_BUILD_FLAGS" | 1356 | AUTORECONF_ARGS="$GNU_BUILD_FLAGS" |
733 | 1186 | fi | 1357 | fi |
734 | 1187 | fi | 1358 | fi |
735 | 1188 | 1359 | ||
736 | @@ -1200,6 +1371,9 @@ | |||
737 | 1200 | echo 'BOOTSTRAP ENV' | 1371 | echo 'BOOTSTRAP ENV' |
738 | 1201 | echo "AUTORECONF=$AUTORECONF" | 1372 | echo "AUTORECONF=$AUTORECONF" |
739 | 1202 | echo "HOST_OS=$HOST_OS" | 1373 | echo "HOST_OS=$HOST_OS" |
740 | 1374 | echo "VENDOR=$VENDOR" | ||
741 | 1375 | echo "VENDOR_DISTRIBUTION=$VENDOR_DISTRIBUTION" | ||
742 | 1376 | echo "VENDOR_RELEASE=$VENDOR_RELEASE" | ||
743 | 1203 | 1377 | ||
744 | 1204 | echo "getopt()" | 1378 | echo "getopt()" |
745 | 1205 | if $AUTORECONF_OPTION; then | 1379 | if $AUTORECONF_OPTION; then |
746 | @@ -1333,18 +1507,25 @@ | |||
747 | 1333 | ;; | 1507 | ;; |
748 | 1334 | 'make_default') | 1508 | 'make_default') |
749 | 1335 | ;; | 1509 | ;; |
755 | 1336 | 'test-*') | 1510 | 'clang') |
756 | 1337 | ;; | 1511 | ;; |
757 | 1338 | 'valgrind-*') | 1512 | 'clang-analyzer') |
758 | 1339 | ;; | 1513 | ;; |
759 | 1340 | 'gdb-*') | 1514 | test-*) |
760 | 1515 | ;; | ||
761 | 1516 | valgrind-*) | ||
762 | 1517 | ;; | ||
763 | 1518 | gdb-*) | ||
764 | 1341 | ;; | 1519 | ;; |
765 | 1342 | 'dist') | 1520 | 'dist') |
766 | 1343 | ;; | 1521 | ;; |
767 | 1344 | *) | 1522 | *) |
769 | 1345 | die "Unknown MAKE_TARGET option: $1" | 1523 | echo "Matched default" |
770 | 1524 | return 1 | ||
771 | 1346 | ;; | 1525 | ;; |
772 | 1347 | esac | 1526 | esac |
773 | 1527 | |||
774 | 1528 | return 0 | ||
775 | 1348 | } | 1529 | } |
776 | 1349 | 1530 | ||
777 | 1350 | function bootstrap () | 1531 | function bootstrap () |
778 | @@ -1355,7 +1536,9 @@ | |||
779 | 1355 | 1536 | ||
780 | 1356 | # Set up whatever we need to do to use autoreconf later | 1537 | # Set up whatever we need to do to use autoreconf later |
781 | 1357 | require_libtoolise | 1538 | require_libtoolise |
783 | 1358 | autoreconf_setup | 1539 | if ! autoreconf_setup; then |
784 | 1540 | return 1 | ||
785 | 1541 | fi | ||
786 | 1359 | 1542 | ||
787 | 1360 | if [ -z "$MAKE_TARGET" ]; then | 1543 | if [ -z "$MAKE_TARGET" ]; then |
788 | 1361 | MAKE_TARGET="make_default" | 1544 | MAKE_TARGET="make_default" |
789 | @@ -1377,7 +1560,7 @@ | |||
790 | 1377 | 1560 | ||
791 | 1378 | # Set ENV PREFIX in order to set --prefix for ./configure | 1561 | # Set ENV PREFIX in order to set --prefix for ./configure |
792 | 1379 | if [[ -n "$PREFIX" ]]; then | 1562 | if [[ -n "$PREFIX" ]]; then |
794 | 1380 | push_PREFIX_ARG $PREFIX | 1563 | PREFIX_ARG="--prefix=$PREFIX" |
795 | 1381 | fi | 1564 | fi |
796 | 1382 | 1565 | ||
797 | 1383 | # We should always have a target by this point | 1566 | # We should always have a target by this point |
798 | @@ -1390,8 +1573,15 @@ | |||
799 | 1390 | # If we are running inside of Jenkins, we want to only run some of the possible tests | 1573 | # If we are running inside of Jenkins, we want to only run some of the possible tests |
800 | 1391 | if $jenkins_build_environment; then | 1574 | if $jenkins_build_environment; then |
801 | 1392 | check_make_target $target | 1575 | check_make_target $target |
802 | 1576 | ret=$? | ||
803 | 1577 | if [ $ret -ne 0 ]; then | ||
804 | 1578 | die "Unknown MAKE_TARGET option: $target" | ||
805 | 1579 | fi | ||
806 | 1393 | fi | 1580 | fi |
807 | 1394 | 1581 | ||
808 | 1582 | local snapshot_run=false | ||
809 | 1583 | local valgrind_run=false | ||
810 | 1584 | |||
811 | 1395 | case $target in | 1585 | case $target in |
812 | 1396 | 'self') | 1586 | 'self') |
813 | 1397 | self_test | 1587 | self_test |
814 | @@ -1417,26 +1607,48 @@ | |||
815 | 1417 | 'make_default') | 1607 | 'make_default') |
816 | 1418 | make_default | 1608 | make_default |
817 | 1419 | ;; | 1609 | ;; |
818 | 1610 | 'clang') | ||
819 | 1611 | if ! check_clang; then | ||
820 | 1612 | die "clang was not found" | ||
821 | 1613 | fi | ||
822 | 1614 | |||
823 | 1615 | if ! make_for_clang; then | ||
824 | 1616 | die "Failed to build clang: $?" | ||
825 | 1617 | fi | ||
826 | 1618 | ;; | ||
827 | 1619 | 'clang-analyzer') | ||
828 | 1620 | if ! check_clang_analyzer; then | ||
829 | 1621 | die "clang-analyzer was not found" | ||
830 | 1622 | fi | ||
831 | 1623 | if ! check_clang; then | ||
832 | 1624 | die "clang was not found" | ||
833 | 1625 | fi | ||
834 | 1626 | |||
835 | 1627 | if ! make_for_clang_analyzer; then | ||
836 | 1628 | die "Failed to build clang-analyzer: $?" | ||
837 | 1629 | fi | ||
838 | 1630 | ;; | ||
839 | 1420 | 'mingw') | 1631 | 'mingw') |
840 | 1421 | check_mingw | ||
841 | 1422 | if ! check_mingw; then | 1632 | if ! check_mingw; then |
842 | 1423 | die "mingw was not found" | 1633 | die "mingw was not found" |
843 | 1424 | fi | 1634 | fi |
844 | 1425 | 1635 | ||
845 | 1426 | make_for_mingw | ||
846 | 1427 | check_ret=$? | ||
847 | 1428 | |||
848 | 1429 | if ! make_for_mingw; then | 1636 | if ! make_for_mingw; then |
849 | 1430 | die "Failed to build mingw: $?" | 1637 | die "Failed to build mingw: $?" |
850 | 1431 | fi | 1638 | fi |
851 | 1432 | ;; | 1639 | ;; |
852 | 1433 | 'snapshot') | 1640 | 'snapshot') |
853 | 1434 | make_for_snapshot | 1641 | make_for_snapshot |
854 | 1642 | snapshot_run=true | ||
855 | 1435 | ;; | 1643 | ;; |
856 | 1436 | 'rpm') | 1644 | 'rpm') |
857 | 1437 | make_rpm | 1645 | make_rpm |
858 | 1438 | ;; | 1646 | ;; |
859 | 1647 | 'darwin_malloc') | ||
860 | 1648 | make_darwin_malloc | ||
861 | 1649 | ;; | ||
862 | 1439 | 'valgrind') | 1650 | 'valgrind') |
863 | 1651 | make_maintainer_clean | ||
864 | 1440 | make_valgrind | 1652 | make_valgrind |
865 | 1441 | ;; | 1653 | ;; |
866 | 1442 | 'universe') | 1654 | 'universe') |
867 | @@ -1450,6 +1662,13 @@ | |||
868 | 1450 | make_target "$target" | 1662 | make_target "$target" |
869 | 1451 | ;; | 1663 | ;; |
870 | 1452 | esac | 1664 | esac |
871 | 1665 | |||
872 | 1666 | if $jenkins_build_environment; then | ||
873 | 1667 | if ! $snapshot_run; then | ||
874 | 1668 | run_make_maintainer_clean_if_possible | ||
875 | 1669 | fi | ||
876 | 1670 | fi | ||
877 | 1671 | |||
878 | 1453 | done | 1672 | done |
879 | 1454 | } | 1673 | } |
880 | 1455 | 1674 | ||
881 | @@ -1474,6 +1693,7 @@ | |||
882 | 1474 | 1693 | ||
883 | 1475 | local OLD_CONFIGURE= | 1694 | local OLD_CONFIGURE= |
884 | 1476 | local OLD_CONFIGURE_ARG= | 1695 | local OLD_CONFIGURE_ARG= |
885 | 1696 | local OLD_PREFIX= | ||
886 | 1477 | local OLD_MAKE= | 1697 | local OLD_MAKE= |
887 | 1478 | local OLD_TESTS_ENVIRONMENT= | 1698 | local OLD_TESTS_ENVIRONMENT= |
888 | 1479 | 1699 | ||
889 | @@ -1517,7 +1737,16 @@ | |||
890 | 1517 | # We don't want Jenkins overriding other variables, so we NULL them. | 1737 | # We don't want Jenkins overriding other variables, so we NULL them. |
891 | 1518 | if [ -z "$MAKE_TARGET" ]; then | 1738 | if [ -z "$MAKE_TARGET" ]; then |
892 | 1519 | if $jenkins_build_environment; then | 1739 | if $jenkins_build_environment; then |
894 | 1520 | MAKE_TARGET='jenkins' | 1740 | if [[ -n "$label" ]]; then |
895 | 1741 | check_make_target $label | ||
896 | 1742 | if [ $? -eq 0 ]; then | ||
897 | 1743 | MAKE_TARGET="$label" | ||
898 | 1744 | fi | ||
899 | 1745 | fi | ||
900 | 1746 | |||
901 | 1747 | if [ -z "$MAKE_TARGET" ]; then | ||
902 | 1748 | MAKE_TARGET='check' | ||
903 | 1749 | fi | ||
904 | 1521 | fi | 1750 | fi |
905 | 1522 | fi | 1751 | fi |
906 | 1523 | 1752 | ||
907 | @@ -1620,11 +1849,13 @@ | |||
908 | 1620 | export AUTOM4TE | 1849 | export AUTOM4TE |
909 | 1621 | export AUTOMAKE | 1850 | export AUTOMAKE |
910 | 1622 | export AUTORECONF | 1851 | export AUTORECONF |
911 | 1852 | export CONFIGURE_ARG | ||
912 | 1623 | export DEBUG | 1853 | export DEBUG |
913 | 1624 | export GNU_BUILD_FLAGS | 1854 | export GNU_BUILD_FLAGS |
914 | 1625 | export LIBTOOLIZE | 1855 | export LIBTOOLIZE |
915 | 1626 | export LIBTOOLIZE_OPTIONS | 1856 | export LIBTOOLIZE_OPTIONS |
916 | 1627 | export MAKE | 1857 | export MAKE |
917 | 1858 | export PREFIX_ARG | ||
918 | 1628 | export TESTS_ENVIRONMENT | 1859 | export TESTS_ENVIRONMENT |
919 | 1629 | export VERBOSE | 1860 | export VERBOSE |
920 | 1630 | export WARNINGS | 1861 | export WARNINGS |
921 | 1631 | 1862 | ||
922 | === modified file 'configure.ac' | |||
923 | --- configure.ac 2013-04-25 10:26:18 +0000 | |||
924 | +++ configure.ac 2013-04-28 22:03:24 +0000 | |||
925 | @@ -44,6 +44,9 @@ | |||
926 | 44 | LT_INIT | 44 | LT_INIT |
927 | 45 | LT_LANG([C++]) | 45 | LT_LANG([C++]) |
928 | 46 | 46 | ||
929 | 47 | AC_PROG_CC_C99 | ||
930 | 48 | AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])]) | ||
931 | 49 | |||
932 | 47 | AX_PLATFORM | 50 | AX_PLATFORM |
933 | 48 | AX_ASSERT | 51 | AX_ASSERT |
934 | 49 | 52 | ||
935 | 50 | 53 | ||
936 | === modified file 'libdrizzle/sha1.cc' | |||
937 | --- libdrizzle/sha1.cc 2012-12-19 12:07:00 +0000 | |||
938 | +++ libdrizzle/sha1.cc 2013-04-28 22:03:24 +0000 | |||
939 | @@ -128,7 +128,7 @@ | |||
940 | 128 | void | 128 | void |
941 | 129 | SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len) | 129 | SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len) |
942 | 130 | { | 130 | { |
944 | 131 | size_t i, j; | 131 | uint32_t i, j; |
945 | 132 | 132 | ||
946 | 133 | j = (size_t)((context->count >> 3) & 63); | 133 | j = (size_t)((context->count >> 3) & 63); |
947 | 134 | context->count += (len << 3); | 134 | context->count += (len << 3); |
948 | 135 | 135 | ||
949 | === modified file 'm4/ax_harden_compiler_flags.m4' | |||
950 | --- m4/ax_harden_compiler_flags.m4 2013-04-26 19:50:55 +0000 | |||
951 | +++ m4/ax_harden_compiler_flags.m4 2013-04-28 22:03:24 +0000 | |||
952 | @@ -1,3 +1,4 @@ | |||
953 | 1 | # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
954 | 1 | # =========================================================================== | 2 | # =========================================================================== |
955 | 2 | # https://github.com/BrianAker/ddm4/ | 3 | # https://github.com/BrianAker/ddm4/ |
956 | 3 | # =========================================================================== | 4 | # =========================================================================== |
957 | @@ -14,7 +15,7 @@ | |||
958 | 14 | # | 15 | # |
959 | 15 | # LICENSE | 16 | # LICENSE |
960 | 16 | # | 17 | # |
962 | 17 | # Copyright (C) 2012 Brian Aker | 18 | # Copyright (C) 2012-2013 Brian Aker |
963 | 18 | # All rights reserved. | 19 | # All rights reserved. |
964 | 19 | # | 20 | # |
965 | 20 | # Redistribution and use in source and binary forms, with or without | 21 | # Redistribution and use in source and binary forms, with or without |
966 | @@ -52,7 +53,7 @@ | |||
967 | 52 | # ? _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) -- Don't turn on for | 53 | # ? _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) -- Don't turn on for |
968 | 53 | # compatibility issues memcached_stat_st | 54 | # compatibility issues memcached_stat_st |
969 | 54 | 55 | ||
971 | 55 | #serial 7 | 56 | #serial 9 |
972 | 56 | 57 | ||
973 | 57 | AC_DEFUN([_WARNINGS_AS_ERRORS], | 58 | AC_DEFUN([_WARNINGS_AS_ERRORS], |
974 | 58 | [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors], | 59 | [AC_CACHE_CHECK([if all warnings into errors],[ac_cv_warnings_as_errors], |
975 | @@ -75,10 +76,11 @@ | |||
976 | 75 | # Everything above this does the heavy lifting, while what follows does the specifics. | 76 | # Everything above this does the heavy lifting, while what follows does the specifics. |
977 | 76 | 77 | ||
978 | 77 | AC_DEFUN([_HARDEN_LINKER_FLAGS], | 78 | AC_DEFUN([_HARDEN_LINKER_FLAGS], |
983 | 78 | [_APPEND_LINK_FLAGS_ERROR([-z relro -z now]) | 79 | [ |
984 | 79 | #_APPEND_LINK_FLAGS_ERROR([-pie]) | 80 | AS_IF([test "$CC" != "clang"], |
985 | 80 | AS_IF([test "x$ac_cv_warnings_as_errors" = xyes], | 81 | [_APPEND_LINK_FLAGS_ERROR([-z relro -z now]) |
986 | 81 | [AX_APPEND_LINK_FLAGS([-Werror])]) | 82 | AS_IF([test "x$ac_cv_warnings_as_errors" = xyes], |
987 | 83 | [AX_APPEND_LINK_FLAGS([-Werror])])]) | ||
988 | 82 | ]) | 84 | ]) |
989 | 83 | 85 | ||
990 | 84 | AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS], | 86 | AC_DEFUN([_HARDEN_CC_COMPILER_FLAGS], |
991 | @@ -86,27 +88,37 @@ | |||
992 | 86 | 88 | ||
993 | 87 | AS_IF([test "x$ax_enable_debug" = xyes], | 89 | AS_IF([test "x$ax_enable_debug" = xyes], |
994 | 88 | [CFLAGS='' | 90 | [CFLAGS='' |
995 | 91 | _APPEND_COMPILE_FLAGS_ERROR([-H]) | ||
996 | 89 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) | 92 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) |
997 | 90 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | 93 | _APPEND_COMPILE_FLAGS_ERROR([-g]) |
1001 | 91 | _APPEND_COMPILE_FLAGS_ERROR([-O0])], | 94 | _APPEND_COMPILE_FLAGS_ERROR([-O0]), |
1002 | 92 | [_APPEND_COMPILE_FLAGS_ERROR([-g]) | 95 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1003 | 93 | _APPEND_COMPILE_FLAGS_ERROR([-O2])]) | 96 | ],[ |
1004 | 97 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | ||
1005 | 98 | _APPEND_COMPILE_FLAGS_ERROR([-O2]) | ||
1006 | 99 | ]) | ||
1007 | 94 | 100 | ||
1008 | 95 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 101 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1011 | 96 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check])], | 102 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) |
1012 | 97 | [_APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) | 103 | _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas]) |
1013 | 104 | _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])], | ||
1014 | 105 | [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas]) | ||
1015 | 106 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) | ||
1016 | 107 | |||
1017 | 108 | AS_IF([test "$CC" = "clang"], | ||
1018 | 109 | [_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])]) | ||
1019 | 98 | 110 | ||
1020 | 99 | _APPEND_COMPILE_FLAGS_ERROR([-Wall]) | 111 | _APPEND_COMPILE_FLAGS_ERROR([-Wall]) |
1021 | 100 | _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) | 112 | _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) |
1022 | 101 | _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas]) | ||
1023 | 102 | _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) | 113 | _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) |
1024 | 103 | _APPEND_COMPILE_FLAGS_ERROR([-std=c99]) | 114 | _APPEND_COMPILE_FLAGS_ERROR([-std=c99]) |
1025 | 104 | # Anything below this comment please keep sorted. | 115 | # Anything below this comment please keep sorted. |
1026 | 105 | AS_IF([test "x$CC_VERSION_VENDOR" != xclang], | ||
1027 | 106 | [_APPEND_COMPILE_FLAGS_ERROR([--param=ssp-buffer-size=1])], []) | ||
1028 | 107 | # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) | 116 | # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) |
1029 | 117 | _APPEND_COMPILE_FLAGS_ERROR([-Wunsuffixed-float-constants]) | ||
1030 | 118 | _APPEND_COMPILE_FLAGS_ERROR([-Wjump-misses-init]) | ||
1031 | 108 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) | 119 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) |
1032 | 109 | _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) | 120 | _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) |
1033 | 121 | _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs]) | ||
1034 | 110 | _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) | 122 | _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) |
1035 | 111 | _APPEND_COMPILE_FLAGS_ERROR([-Wbad-function-cast]) | 123 | _APPEND_COMPILE_FLAGS_ERROR([-Wbad-function-cast]) |
1036 | 112 | # Not in use -Wc++-compat | 124 | # Not in use -Wc++-compat |
1037 | @@ -115,6 +127,7 @@ | |||
1038 | 115 | _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) | 127 | _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) |
1039 | 116 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) | 128 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) |
1040 | 117 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) | 129 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) |
1041 | 130 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k]) | ||
1042 | 118 | _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op]) | 131 | _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op]) |
1043 | 119 | _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized]) | 132 | _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized]) |
1044 | 120 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) | 133 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) |
1045 | @@ -124,7 +137,6 @@ | |||
1046 | 124 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-prototypes]) | 137 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-prototypes]) |
1047 | 125 | _APPEND_COMPILE_FLAGS_ERROR([-Wnested-externs]) | 138 | _APPEND_COMPILE_FLAGS_ERROR([-Wnested-externs]) |
1048 | 126 | _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id]) | 139 | _APPEND_COMPILE_FLAGS_ERROR([-Wnormalized=id]) |
1049 | 127 | _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-definition]) | ||
1050 | 128 | _APPEND_COMPILE_FLAGS_ERROR([-Woverride-init]) | 140 | _APPEND_COMPILE_FLAGS_ERROR([-Woverride-init]) |
1051 | 129 | _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith]) | 141 | _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-arith]) |
1052 | 130 | _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-sign]) | 142 | _APPEND_COMPILE_FLAGS_ERROR([-Wpointer-sign]) |
1053 | @@ -141,15 +153,48 @@ | |||
1054 | 141 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) | 153 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) |
1055 | 142 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-prototypes]) | 154 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-prototypes]) |
1056 | 143 | _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) | 155 | _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) |
1057 | 156 | _APPEND_COMPILE_FLAGS_ERROR([-Wtrampolines]) | ||
1058 | 144 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) | 157 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) |
1059 | 158 | _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) | ||
1060 | 159 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) | ||
1061 | 160 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes && test "x$MINGW" != xyes],[ | ||
1062 | 161 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) | ||
1063 | 162 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) | ||
1064 | 163 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) | ||
1065 | 164 | AS_IF([test "x$enable_shared" = "xyes"],[ | ||
1066 | 165 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) | ||
1067 | 166 | ]) | ||
1068 | 167 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) | ||
1069 | 168 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) | ||
1070 | 169 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) | ||
1071 | 170 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) | ||
1072 | 171 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) | ||
1073 | 172 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) | ||
1074 | 173 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) | ||
1075 | 174 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) | ||
1076 | 175 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) | ||
1077 | 176 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) | ||
1078 | 177 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) | ||
1079 | 178 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) | ||
1080 | 179 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) | ||
1081 | 180 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) | ||
1082 | 181 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | ||
1083 | 182 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | ||
1084 | 183 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | ||
1085 | 184 | ]) | ||
1086 | 185 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) | ||
1087 | 145 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) | 186 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) |
1088 | 146 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) | 187 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) |
1089 | 147 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) | 188 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) |
1090 | 189 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter]) | ||
1091 | 190 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs]) | ||
1092 | 148 | _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) | 191 | _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) |
1093 | 149 | _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all]) | 192 | _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all]) |
1094 | 150 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) | 193 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) |
1095 | 151 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) | 194 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) |
1096 | 152 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) | 195 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) |
1097 | 196 | _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie]) | ||
1098 | 197 | _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) | ||
1099 | 153 | 198 | ||
1100 | 154 | AS_IF([test "x$ax_enable_debug" = xno], | 199 | AS_IF([test "x$ax_enable_debug" = xno], |
1101 | 155 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 200 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1102 | @@ -157,7 +202,7 @@ | |||
1103 | 157 | [AS_IF([test "x$ac_c_gcc_recent" = xyes], | 202 | [AS_IF([test "x$ac_c_gcc_recent" = xyes], |
1104 | 158 | [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) | 203 | [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) |
1105 | 159 | #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) | 204 | #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) |
1107 | 160 | #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector]) | 205 | #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) |
1108 | 161 | _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) | 206 | _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) |
1109 | 162 | ])])])]) | 207 | ])])])]) |
1110 | 163 | 208 | ||
1111 | @@ -173,25 +218,33 @@ | |||
1112 | 173 | 218 | ||
1113 | 174 | AS_IF([test "x$ax_enable_debug" = xyes], | 219 | AS_IF([test "x$ax_enable_debug" = xyes], |
1114 | 175 | [CXXFLAGS='' | 220 | [CXXFLAGS='' |
1115 | 221 | _APPEND_COMPILE_FLAGS_ERROR([-H]) | ||
1116 | 176 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) | 222 | _APPEND_COMPILE_FLAGS_ERROR([-ggdb]) |
1117 | 177 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | 223 | _APPEND_COMPILE_FLAGS_ERROR([-g]) |
1121 | 178 | _APPEND_COMPILE_FLAGS_ERROR([-O0])], | 224 | _APPEND_COMPILE_FLAGS_ERROR([-O0]), |
1122 | 179 | [_APPEND_COMPILE_FLAGS_ERROR([-g]) | 225 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) |
1123 | 180 | _APPEND_COMPILE_FLAGS_ERROR([-O2])]) | 226 | ],[ |
1124 | 227 | _APPEND_COMPILE_FLAGS_ERROR([-g]) | ||
1125 | 228 | _APPEND_COMPILE_FLAGS_ERROR([-O2]) | ||
1126 | 229 | ]) | ||
1127 | 181 | 230 | ||
1128 | 182 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 231 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1131 | 183 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check])], | 232 | [_APPEND_COMPILE_FLAGS_ERROR([-fstack-check]) |
1132 | 184 | [_APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) | 233 | _APPEND_COMPILE_FLAGS_ERROR([-Wpragmas]) |
1133 | 234 | _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas])], | ||
1134 | 235 | [_APPEND_COMPILE_FLAGS_ERROR([-Wno-unknown-pragmas]) | ||
1135 | 236 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-pragmas])]) | ||
1136 | 237 | |||
1137 | 238 | AS_IF([test "$CXX" = "clang++"], | ||
1138 | 239 | [_APPEND_COMPILE_FLAGS_ERROR([-Qunused-arguments])]) | ||
1139 | 185 | 240 | ||
1140 | 186 | _APPEND_COMPILE_FLAGS_ERROR([-Wall]) | 241 | _APPEND_COMPILE_FLAGS_ERROR([-Wall]) |
1141 | 187 | _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) | 242 | _APPEND_COMPILE_FLAGS_ERROR([-Wextra]) |
1142 | 188 | _APPEND_COMPILE_FLAGS_ERROR([-Wunknown-pragmas]) | ||
1143 | 189 | _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) | 243 | _APPEND_COMPILE_FLAGS_ERROR([-Wthis-test-should-fail]) |
1144 | 190 | # Anything below this comment please keep sorted. | 244 | # Anything below this comment please keep sorted. |
1145 | 191 | AS_IF([test "x$CXX_VERSION_VENDOR" != xclang], | ||
1146 | 192 | [_APPEND_COMPILE_FLAGS_ERROR([--param=ssp-buffer-size=1])], []) | ||
1147 | 193 | # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) | 245 | # _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) |
1148 | 194 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) | 246 | _APPEND_COMPILE_FLAGS_ERROR([-Wno-attributes]) |
1149 | 247 | _APPEND_COMPILE_FLAGS_ERROR([-Wvarargs]) | ||
1150 | 195 | _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) | 248 | _APPEND_COMPILE_FLAGS_ERROR([-Waddress]) |
1151 | 196 | _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) | 249 | _APPEND_COMPILE_FLAGS_ERROR([-Warray-bounds]) |
1152 | 197 | _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts]) | 250 | _APPEND_COMPILE_FLAGS_ERROR([-Wchar-subscripts]) |
1153 | @@ -199,6 +252,7 @@ | |||
1154 | 199 | _APPEND_COMPILE_FLAGS_ERROR([-Wctor-dtor-privacy]) | 252 | _APPEND_COMPILE_FLAGS_ERROR([-Wctor-dtor-privacy]) |
1155 | 200 | _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) | 253 | _APPEND_COMPILE_FLAGS_ERROR([-Wfloat-equal]) |
1156 | 201 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) | 254 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat=2]) |
1157 | 255 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-y2k]) | ||
1158 | 202 | _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized]) | 256 | _APPEND_COMPILE_FLAGS_ERROR([-Wmaybe-uninitialized]) |
1159 | 203 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) | 257 | _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-field-initializers]) |
1160 | 204 | _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op]) | 258 | _APPEND_COMPILE_FLAGS_ERROR([-Wlogical-op]) |
1161 | @@ -219,17 +273,52 @@ | |||
1162 | 219 | _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare]) | 273 | _APPEND_COMPILE_FLAGS_ERROR([-Wsign-compare]) |
1163 | 220 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) | 274 | _APPEND_COMPILE_FLAGS_ERROR([-Wstrict-overflow=1]) |
1164 | 221 | _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) | 275 | _APPEND_COMPILE_FLAGS_ERROR([-Wswitch-enum]) |
1165 | 276 | _APPEND_COMPILE_FLAGS_ERROR([-Wtrampolines]) | ||
1166 | 222 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) | 277 | _APPEND_COMPILE_FLAGS_ERROR([-Wundef]) |
1167 | 278 | _APPEND_COMPILE_FLAGS_ERROR([-Wunsafe-loop-optimizations]) | ||
1168 | 279 | _APPEND_COMPILE_FLAGS_ERROR([-funsafe-loop-optimizations]) | ||
1169 | 223 | _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) | 280 | _APPEND_COMPILE_FLAGS_ERROR([-Wc++11-compat]) |
1170 | 281 | # _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) | ||
1171 | 282 | AS_IF([test "x$ac_cv_vcs_checkout" = xyes && test "x$MINGW" != xyes],[ | ||
1172 | 283 | _APPEND_COMPILE_FLAGS_ERROR([-fno-omit-frame-pointer]) | ||
1173 | 284 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=address]) | ||
1174 | 285 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer]) | ||
1175 | 286 | AS_IF([test "x$enable_shared" = "xyes"],[ | ||
1176 | 287 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=thread]) | ||
1177 | 288 | ]) | ||
1178 | 289 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=memory]) | ||
1179 | 290 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=alignment]) | ||
1180 | 291 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bool]) | ||
1181 | 292 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=bounds]) | ||
1182 | 293 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=enum]) | ||
1183 | 294 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-cast-overflow]) | ||
1184 | 295 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) | ||
1185 | 296 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) | ||
1186 | 297 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) | ||
1187 | 298 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) | ||
1188 | 299 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) | ||
1189 | 300 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) | ||
1190 | 301 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) | ||
1191 | 302 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) | ||
1192 | 303 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) | ||
1193 | 304 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) | ||
1194 | 305 | _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) | ||
1195 | 306 | ]) | ||
1196 | 307 | # _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) | ||
1197 | 308 | _APPEND_COMPILE_FLAGS_ERROR([-Wclobbered]) | ||
1198 | 224 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) | 309 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused]) |
1199 | 225 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) | 310 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-result]) |
1200 | 226 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) | 311 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-variable]) |
1201 | 312 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-parameter]) | ||
1202 | 313 | _APPEND_COMPILE_FLAGS_ERROR([-Wunused-local-typedefs]) | ||
1203 | 227 | _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) | 314 | _APPEND_COMPILE_FLAGS_ERROR([-Wwrite-strings]) |
1204 | 228 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) | 315 | _APPEND_COMPILE_FLAGS_ERROR([-Wformat-security]) |
1205 | 229 | _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all]) | 316 | _APPEND_COMPILE_FLAGS_ERROR([-floop-parallelize-all]) |
1206 | 230 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) | 317 | _APPEND_COMPILE_FLAGS_ERROR([-fwrapv]) |
1207 | 231 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) | 318 | _APPEND_COMPILE_FLAGS_ERROR([-fmudflapt]) |
1208 | 232 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) | 319 | _APPEND_COMPILE_FLAGS_ERROR([-pipe]) |
1209 | 320 | _APPEND_COMPILE_FLAGS_ERROR([-fPIE -pie]) | ||
1210 | 321 | _APPEND_COMPILE_FLAGS_ERROR([-Wsizeof-pointer-memaccess]) | ||
1211 | 233 | 322 | ||
1212 | 234 | AS_IF([test "x$ax_enable_debug" = xno], | 323 | AS_IF([test "x$ax_enable_debug" = xno], |
1213 | 235 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], | 324 | [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], |
1214 | @@ -237,7 +326,7 @@ | |||
1215 | 237 | [AS_IF([test "x$ac_c_gcc_recent" = xyes], | 326 | [AS_IF([test "x$ac_c_gcc_recent" = xyes], |
1216 | 238 | [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) | 327 | [_APPEND_COMPILE_FLAGS_ERROR([-D_FORTIFY_SOURCE=2]) |
1217 | 239 | #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) | 328 | #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) |
1219 | 240 | #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector]) | 329 | #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) |
1220 | 241 | _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) | 330 | _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) |
1221 | 242 | ])])])]) | 331 | ])])])]) |
1222 | 243 | 332 | ||
1223 | 244 | 333 | ||
1224 | === modified file 'tests/unit/numbers.c' | |||
1225 | --- tests/unit/numbers.c 2013-04-26 18:53:22 +0000 | |||
1226 | +++ tests/unit/numbers.c 2013-04-28 22:03:24 +0000 | |||
1227 | @@ -91,7 +91,7 @@ | |||
1228 | 91 | set_up_connection(); | 91 | set_up_connection(); |
1229 | 92 | set_up_schema("test_numbers"); | 92 | set_up_schema("test_numbers"); |
1230 | 93 | 93 | ||
1232 | 94 | CHECKED_QUERY("create table test_numbers.t1 (a int primary key auto_increment, b tinyint, c smallint, d mediumint, e int, f bigint, g float, h double)"); | 94 | CHECKED_QUERY("create table test_numbers.t1 (a int primary key auto_increment, b tinyint, c smallint, d mediumint, e int, f bigint, g float, h double(16,13))"); |
1233 | 95 | 95 | ||
1234 | 96 | /* Insert rows with pk 1 and 2 */ | 96 | /* Insert rows with pk 1 and 2 */ |
1235 | 97 | CHECKED_QUERY("insert into test_numbers.t1 (b,c,d,e,f,g,h) values (1,1,1,1,1,1,1), (127,32687,8388351,2147352575,9222246136947920895,443664,291.2711110711098);"); | 97 | CHECKED_QUERY("insert into test_numbers.t1 (b,c,d,e,f,g,h) values (1,1,1,1,1,1,1), (127,32687,8388351,2147352575,9222246136947920895,443664,291.2711110711098);"); |
1236 | @@ -110,8 +110,8 @@ | |||
1237 | 110 | CHECK(drizzle_stmt_set_int(sth, 2, 8388351, 0)); | 110 | CHECK(drizzle_stmt_set_int(sth, 2, 8388351, 0)); |
1238 | 111 | CHECK(drizzle_stmt_set_int(sth, 3, 2147352575, 0)); | 111 | CHECK(drizzle_stmt_set_int(sth, 3, 2147352575, 0)); |
1239 | 112 | CHECK(drizzle_stmt_set_bigint(sth, 4, 9222246136947920895, 0)); | 112 | CHECK(drizzle_stmt_set_bigint(sth, 4, 9222246136947920895, 0)); |
1242 | 113 | CHECK(drizzle_stmt_set_float(sth, 5, 443664.0)); | 113 | CHECK(drizzle_stmt_set_float(sth, 5, 443664.0f)); |
1243 | 114 | CHECK(drizzle_stmt_set_double(sth, 6, 291.2711110711098)); | 114 | CHECK(drizzle_stmt_set_double(sth, 6, 291.2711110711098l)); |
1244 | 115 | driz_ret = drizzle_stmt_execute(sth); | 115 | driz_ret = drizzle_stmt_execute(sth); |
1245 | 116 | ASSERT_EQ_(driz_ret, DRIZZLE_RETURN_OK, "Error (%s): %s, executing \"%s\"", drizzle_strerror(driz_ret), drizzle_error(con), query); | 116 | ASSERT_EQ_(driz_ret, DRIZZLE_RETURN_OK, "Error (%s): %s, executing \"%s\"", drizzle_strerror(driz_ret), drizzle_error(con), query); |
1246 | 117 | driz_ret = drizzle_stmt_buffer(sth); | 117 | driz_ret = drizzle_stmt_buffer(sth); |
1247 | @@ -257,21 +257,21 @@ | |||
1248 | 257 | ASSERT_STREQ(expect_strval, col_strval); | 257 | ASSERT_STREQ(expect_strval, col_strval); |
1249 | 258 | } | 258 | } |
1250 | 259 | 259 | ||
1253 | 260 | float expect_floatval = 0.0; | 260 | float expect_floatval = 0.0f; |
1254 | 261 | double expect_dblval = 0.0; | 261 | double expect_dblval = 0.0f; |
1255 | 262 | switch (columnA) { | 262 | switch (columnA) { |
1256 | 263 | case 1: | 263 | case 1: |
1259 | 264 | expect_floatval = 1.0; | 264 | expect_floatval = 1.0f; |
1260 | 265 | expect_dblval = 1.0; | 265 | expect_dblval = 1.0f; |
1261 | 266 | break; | 266 | break; |
1262 | 267 | case 2: | 267 | case 2: |
1263 | 268 | case 4: | 268 | case 4: |
1266 | 269 | expect_floatval = 443664.0; | 269 | expect_floatval = 443664.0f; |
1267 | 270 | expect_dblval = 291.2711110711098; | 270 | expect_dblval = 291.2711110711098l; |
1268 | 271 | break; | 271 | break; |
1269 | 272 | case 3: | 272 | case 3: |
1272 | 273 | expect_floatval = 443665.0; | 273 | expect_floatval = 443665.0f; |
1273 | 274 | expect_dblval = 292.2711110711098; | 274 | expect_dblval = 292.2711110711098l; |
1274 | 275 | break; | 275 | break; |
1275 | 276 | } | 276 | } |
1276 | 277 | 277 |
sha1 fix is probably "the wrong thing" but it was to kill this warning:
sha1.cc:138: warning: assuming that the loop counter does not overflow