From 7a7a973ec64019907188c581b1d1d028dca172b9 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Mon, 17 Sep 2012 07:41:20 -0400 Subject: [PATCH] Fix UUID and issue on older Debian systems. --- configure.ac | 9 +-- libmemcached/csl/parser.cc | 154 ++++++++++++++++++------------------ libmemcached/csl/parser.yy | 4 + libmemcached/csl/scanner.cc | 152 ++++++++++++++++++----------------- libmemcached/csl/scanner.h | 12 ++- libmemcached/csl/scanner.l | 6 ++ tests/keys.hpp | 7 +- 7 files changed, 183 insertions(+), 161 deletions(-) diff --git a/configure.ac b/configure.ac index 07c77c5a..e1b82ba6 100644 --- a/configure.ac +++ b/configure.ac @@ -185,14 +185,7 @@ AS_IF([test "x$ac_enable_sasl" = "xyes"], [ ]) AC_SUBST(LIBMEMCACHED_WITH_SASL_SUPPORT) -AX_CHECK_LIBRARY([LIBUUID], [uuid/uuid.h], [uuid], - [ - LIBUUID_LDFLAGS="-luuid" - AC_DEFINE([HAVE_LIBUUID], [ 1 ], [Have libuuid]) - ], - [ - AC_DEFINE([HAVE_LIBUUID], [ 0 ], [Have libuuid]) - ]) +AX_UUID_GENERATE_TIME_SAFE AC_CHECK_LIB([rt], [clock_gettime], [ diff --git a/libmemcached/csl/parser.cc b/libmemcached/csl/parser.cc index 4f29ac0b..9ad1e659 100644 --- a/libmemcached/csl/parser.cc +++ b/libmemcached/csl/parser.cc @@ -88,6 +88,10 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif + int conf_lex(YYSTYPE* lvalp, void* scanner); #define select_yychar(__context) yychar == UNKNOWN ? ( (__context)->previous_token == END ? UNKNOWN : (__context)->previous_token ) : yychar @@ -115,7 +119,7 @@ inline void __config_error(Context *context, yyscan_t *scanner, const char *erro /* Line 268 of yacc.c */ -#line 119 "libmemcached/csl/parser.cc" +#line 123 "libmemcached/csl/parser.cc" /* Enabling traces. */ #ifndef YYDEBUG @@ -228,7 +232,7 @@ inline void __config_error(Context *context, yyscan_t *scanner, const char *erro /* Line 343 of yacc.c */ -#line 232 "libmemcached/csl/parser.cc" +#line 236 "libmemcached/csl/parser.cc" #ifdef short # undef short @@ -541,13 +545,13 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 189, 189, 190, 194, 196, 198, 200, 205, 210, - 214, 218, 229, 239, 249, 258, 262, 266, 270, 274, - 286, 290, 303, 316, 323, 330, 339, 345, 349, 353, - 357, 361, 365, 369, 373, 377, 381, 385, 389, 396, - 400, 404, 408, 412, 416, 420, 424, 428, 432, 436, - 440, 447, 448, 453, 454, 459, 463, 467, 471, 475, - 479, 483, 487, 491, 498, 502, 509, 513, 517 + 0, 193, 193, 194, 198, 200, 202, 204, 209, 214, + 218, 222, 233, 243, 253, 262, 266, 270, 274, 278, + 290, 294, 307, 320, 327, 334, 343, 349, 353, 357, + 361, 365, 369, 373, 377, 381, 385, 389, 393, 400, + 404, 408, 412, 416, 420, 424, 428, 432, 436, 440, + 444, 451, 452, 457, 458, 463, 467, 471, 475, 479, + 483, 487, 491, 495, 502, 506, 513, 517, 521 }; #endif @@ -1558,28 +1562,28 @@ yyreduce: case 4: /* Line 1806 of yacc.c */ -#line 195 "libmemcached/csl/parser.yy" +#line 199 "libmemcached/csl/parser.yy" { } break; case 5: /* Line 1806 of yacc.c */ -#line 197 "libmemcached/csl/parser.yy" +#line 201 "libmemcached/csl/parser.yy" { } break; case 6: /* Line 1806 of yacc.c */ -#line 199 "libmemcached/csl/parser.yy" +#line 203 "libmemcached/csl/parser.yy" { } break; case 7: /* Line 1806 of yacc.c */ -#line 201 "libmemcached/csl/parser.yy" +#line 205 "libmemcached/csl/parser.yy" { context->set_end(); YYACCEPT; @@ -1589,7 +1593,7 @@ yyreduce: case 8: /* Line 1806 of yacc.c */ -#line 206 "libmemcached/csl/parser.yy" +#line 210 "libmemcached/csl/parser.yy" { context->rc= MEMCACHED_PARSE_USER_ERROR; parser_abort(context, "ERROR called directly"); @@ -1599,7 +1603,7 @@ yyreduce: case 9: /* Line 1806 of yacc.c */ -#line 211 "libmemcached/csl/parser.yy" +#line 215 "libmemcached/csl/parser.yy" { memcached_reset(context->memc); } @@ -1608,7 +1612,7 @@ yyreduce: case 10: /* Line 1806 of yacc.c */ -#line 215 "libmemcached/csl/parser.yy" +#line 219 "libmemcached/csl/parser.yy" { yydebug= 1; } @@ -1617,7 +1621,7 @@ yyreduce: case 11: /* Line 1806 of yacc.c */ -#line 219 "libmemcached/csl/parser.yy" +#line 223 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS) { @@ -1629,7 +1633,7 @@ yyreduce: case 12: /* Line 1806 of yacc.c */ -#line 230 "libmemcached/csl/parser.yy" +#line 234 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) { @@ -1644,7 +1648,7 @@ yyreduce: case 13: /* Line 1806 of yacc.c */ -#line 240 "libmemcached/csl/parser.yy" +#line 244 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) { @@ -1659,7 +1663,7 @@ yyreduce: case 14: /* Line 1806 of yacc.c */ -#line 250 "libmemcached/csl/parser.yy" +#line 254 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, uint32_t((yyvsp[(3) - (3)].number))))) { @@ -1673,7 +1677,7 @@ yyreduce: case 15: /* Line 1806 of yacc.c */ -#line 259 "libmemcached/csl/parser.yy" +#line 263 "libmemcached/csl/parser.yy" { memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size); } @@ -1682,7 +1686,7 @@ yyreduce: case 16: /* Line 1806 of yacc.c */ -#line 263 "libmemcached/csl/parser.yy" +#line 267 "libmemcached/csl/parser.yy" { context->memc->configure.initial_pool_size= uint32_t((yyvsp[(2) - (2)].number)); } @@ -1691,7 +1695,7 @@ yyreduce: case 17: /* Line 1806 of yacc.c */ -#line 267 "libmemcached/csl/parser.yy" +#line 271 "libmemcached/csl/parser.yy" { context->memc->configure.max_pool_size= uint32_t((yyvsp[(2) - (2)].number)); } @@ -1700,7 +1704,7 @@ yyreduce: case 19: /* Line 1806 of yacc.c */ -#line 275 "libmemcached/csl/parser.yy" +#line 279 "libmemcached/csl/parser.yy" { if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL)) { @@ -1717,7 +1721,7 @@ yyreduce: case 20: /* Line 1806 of yacc.c */ -#line 287 "libmemcached/csl/parser.yy" +#line 291 "libmemcached/csl/parser.yy" { memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true); } @@ -1726,7 +1730,7 @@ yyreduce: case 21: /* Line 1806 of yacc.c */ -#line 291 "libmemcached/csl/parser.yy" +#line 295 "libmemcached/csl/parser.yy" { // Check to see if DISTRIBUTION has already been set if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS) @@ -1744,7 +1748,7 @@ yyreduce: case 22: /* Line 1806 of yacc.c */ -#line 304 "libmemcached/csl/parser.yy" +#line 308 "libmemcached/csl/parser.yy" { // Check to see if DISTRIBUTION has already been set if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS) @@ -1762,7 +1766,7 @@ yyreduce: case 23: /* Line 1806 of yacc.c */ -#line 317 "libmemcached/csl/parser.yy" +#line 321 "libmemcached/csl/parser.yy" { if (context->set_hash((yyvsp[(2) - (2)].hash)) == false) { @@ -1774,7 +1778,7 @@ yyreduce: case 24: /* Line 1806 of yacc.c */ -#line 324 "libmemcached/csl/parser.yy" +#line 328 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS) { @@ -1786,7 +1790,7 @@ yyreduce: case 25: /* Line 1806 of yacc.c */ -#line 331 "libmemcached/csl/parser.yy" +#line 335 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS) { @@ -1800,7 +1804,7 @@ yyreduce: case 26: /* Line 1806 of yacc.c */ -#line 340 "libmemcached/csl/parser.yy" +#line 344 "libmemcached/csl/parser.yy" { } break; @@ -1808,7 +1812,7 @@ yyreduce: case 27: /* Line 1806 of yacc.c */ -#line 346 "libmemcached/csl/parser.yy" +#line 350 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS; } @@ -1817,7 +1821,7 @@ yyreduce: case 28: /* Line 1806 of yacc.c */ -#line 350 "libmemcached/csl/parser.yy" +#line 354 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT; } @@ -1826,7 +1830,7 @@ yyreduce: case 29: /* Line 1806 of yacc.c */ -#line 354 "libmemcached/csl/parser.yy" +#line 358 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK; } @@ -1835,7 +1839,7 @@ yyreduce: case 30: /* Line 1806 of yacc.c */ -#line 358 "libmemcached/csl/parser.yy" +#line 362 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK; } @@ -1844,7 +1848,7 @@ yyreduce: case 31: /* Line 1806 of yacc.c */ -#line 362 "libmemcached/csl/parser.yy" +#line 366 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH; } @@ -1853,7 +1857,7 @@ yyreduce: case 32: /* Line 1806 of yacc.c */ -#line 366 "libmemcached/csl/parser.yy" +#line 370 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS; } @@ -1862,7 +1866,7 @@ yyreduce: case 33: /* Line 1806 of yacc.c */ -#line 370 "libmemcached/csl/parser.yy" +#line 374 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT; } @@ -1871,7 +1875,7 @@ yyreduce: case 34: /* Line 1806 of yacc.c */ -#line 374 "libmemcached/csl/parser.yy" +#line 378 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT; } @@ -1880,7 +1884,7 @@ yyreduce: case 35: /* Line 1806 of yacc.c */ -#line 378 "libmemcached/csl/parser.yy" +#line 382 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT; } @@ -1889,7 +1893,7 @@ yyreduce: case 36: /* Line 1806 of yacc.c */ -#line 382 "libmemcached/csl/parser.yy" +#line 386 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT; } @@ -1898,7 +1902,7 @@ yyreduce: case 37: /* Line 1806 of yacc.c */ -#line 386 "libmemcached/csl/parser.yy" +#line 390 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE; } @@ -1907,7 +1911,7 @@ yyreduce: case 38: /* Line 1806 of yacc.c */ -#line 390 "libmemcached/csl/parser.yy" +#line 394 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE; } @@ -1916,7 +1920,7 @@ yyreduce: case 39: /* Line 1806 of yacc.c */ -#line 397 "libmemcached/csl/parser.yy" +#line 401 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL; } @@ -1925,7 +1929,7 @@ yyreduce: case 40: /* Line 1806 of yacc.c */ -#line 401 "libmemcached/csl/parser.yy" +#line 405 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS; } @@ -1934,7 +1938,7 @@ yyreduce: case 41: /* Line 1806 of yacc.c */ -#line 405 "libmemcached/csl/parser.yy" +#line 409 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY; } @@ -1943,7 +1947,7 @@ yyreduce: case 42: /* Line 1806 of yacc.c */ -#line 409 "libmemcached/csl/parser.yy" +#line 413 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY; } @@ -1952,7 +1956,7 @@ yyreduce: case 43: /* Line 1806 of yacc.c */ -#line 413 "libmemcached/csl/parser.yy" +#line 417 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ; } @@ -1961,7 +1965,7 @@ yyreduce: case 44: /* Line 1806 of yacc.c */ -#line 417 "libmemcached/csl/parser.yy" +#line 421 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS; } @@ -1970,7 +1974,7 @@ yyreduce: case 45: /* Line 1806 of yacc.c */ -#line 421 "libmemcached/csl/parser.yy" +#line 425 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS; } @@ -1979,7 +1983,7 @@ yyreduce: case 46: /* Line 1806 of yacc.c */ -#line 425 "libmemcached/csl/parser.yy" +#line 429 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY; } @@ -1988,7 +1992,7 @@ yyreduce: case 47: /* Line 1806 of yacc.c */ -#line 429 "libmemcached/csl/parser.yy" +#line 433 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE; } @@ -1997,7 +2001,7 @@ yyreduce: case 48: /* Line 1806 of yacc.c */ -#line 433 "libmemcached/csl/parser.yy" +#line 437 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE; } @@ -2006,7 +2010,7 @@ yyreduce: case 49: /* Line 1806 of yacc.c */ -#line 437 "libmemcached/csl/parser.yy" +#line 441 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP; } @@ -2015,7 +2019,7 @@ yyreduce: case 50: /* Line 1806 of yacc.c */ -#line 441 "libmemcached/csl/parser.yy" +#line 445 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY; } @@ -2024,35 +2028,35 @@ yyreduce: case 51: /* Line 1806 of yacc.c */ -#line 447 "libmemcached/csl/parser.yy" +#line 451 "libmemcached/csl/parser.yy" { (yyval.number)= MEMCACHED_DEFAULT_PORT;} break; case 52: /* Line 1806 of yacc.c */ -#line 449 "libmemcached/csl/parser.yy" +#line 453 "libmemcached/csl/parser.yy" { } break; case 53: /* Line 1806 of yacc.c */ -#line 453 "libmemcached/csl/parser.yy" +#line 457 "libmemcached/csl/parser.yy" { (yyval.number)= 1; } break; case 54: /* Line 1806 of yacc.c */ -#line 455 "libmemcached/csl/parser.yy" +#line 459 "libmemcached/csl/parser.yy" { } break; case 55: /* Line 1806 of yacc.c */ -#line 460 "libmemcached/csl/parser.yy" +#line 464 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MD5; } @@ -2061,7 +2065,7 @@ yyreduce: case 56: /* Line 1806 of yacc.c */ -#line 464 "libmemcached/csl/parser.yy" +#line 468 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_CRC; } @@ -2070,7 +2074,7 @@ yyreduce: case 57: /* Line 1806 of yacc.c */ -#line 468 "libmemcached/csl/parser.yy" +#line 472 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_64; } @@ -2079,7 +2083,7 @@ yyreduce: case 58: /* Line 1806 of yacc.c */ -#line 472 "libmemcached/csl/parser.yy" +#line 476 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_64; } @@ -2088,7 +2092,7 @@ yyreduce: case 59: /* Line 1806 of yacc.c */ -#line 476 "libmemcached/csl/parser.yy" +#line 480 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_32; } @@ -2097,7 +2101,7 @@ yyreduce: case 60: /* Line 1806 of yacc.c */ -#line 480 "libmemcached/csl/parser.yy" +#line 484 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_32; } @@ -2106,7 +2110,7 @@ yyreduce: case 61: /* Line 1806 of yacc.c */ -#line 484 "libmemcached/csl/parser.yy" +#line 488 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_HSIEH; } @@ -2115,7 +2119,7 @@ yyreduce: case 62: /* Line 1806 of yacc.c */ -#line 488 "libmemcached/csl/parser.yy" +#line 492 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MURMUR; } @@ -2124,7 +2128,7 @@ yyreduce: case 63: /* Line 1806 of yacc.c */ -#line 492 "libmemcached/csl/parser.yy" +#line 496 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_JENKINS; } @@ -2133,7 +2137,7 @@ yyreduce: case 64: /* Line 1806 of yacc.c */ -#line 499 "libmemcached/csl/parser.yy" +#line 503 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); } @@ -2142,7 +2146,7 @@ yyreduce: case 65: /* Line 1806 of yacc.c */ -#line 503 "libmemcached/csl/parser.yy" +#line 507 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); } @@ -2151,7 +2155,7 @@ yyreduce: case 66: /* Line 1806 of yacc.c */ -#line 510 "libmemcached/csl/parser.yy" +#line 514 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT; } @@ -2160,7 +2164,7 @@ yyreduce: case 67: /* Line 1806 of yacc.c */ -#line 514 "libmemcached/csl/parser.yy" +#line 518 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA; } @@ -2169,7 +2173,7 @@ yyreduce: case 68: /* Line 1806 of yacc.c */ -#line 518 "libmemcached/csl/parser.yy" +#line 522 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM; } @@ -2178,7 +2182,7 @@ yyreduce: /* Line 1806 of yacc.c */ -#line 2182 "libmemcached/csl/parser.cc" +#line 2186 "libmemcached/csl/parser.cc" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2409,7 +2413,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 523 "libmemcached/csl/parser.yy" +#line 527 "libmemcached/csl/parser.yy" void Context::start() diff --git a/libmemcached/csl/parser.yy b/libmemcached/csl/parser.yy index a5131d7f..71459bbe 100644 --- a/libmemcached/csl/parser.yy +++ b/libmemcached/csl/parser.yy @@ -62,6 +62,10 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #endif +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif + int conf_lex(YYSTYPE* lvalp, void* scanner); #define select_yychar(__context) yychar == UNKNOWN ? ( (__context)->previous_token == END ? UNKNOWN : (__context)->previous_token ) : yychar diff --git a/libmemcached/csl/scanner.cc b/libmemcached/csl/scanner.cc index d286c5bd..34adff2f 100644 --- a/libmemcached/csl/scanner.cc +++ b/libmemcached/csl/scanner.cc @@ -19,12 +19,18 @@ #pragma GCC diagnostic ignored "-Wshorten-64-to-32" #endif +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + #define YY_EXTRA_TYPE Context* -#line 28 "libmemcached/csl/scanner.cc" +#line 34 "libmemcached/csl/scanner.cc" #define YY_INT_ALIGNED short int @@ -1067,7 +1073,7 @@ static yyconst flex_int16_t yy_chk[1815] = * */ -#line 64 "libmemcached/csl/scanner.l" +#line 70 "libmemcached/csl/scanner.l" #include #include @@ -1096,7 +1102,7 @@ static yyconst flex_int16_t yy_chk[1815] = #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) #define YY_NO_INPUT 1 -#line 1100 "libmemcached/csl/scanner.cc" +#line 1106 "libmemcached/csl/scanner.cc" #define INITIAL 0 @@ -1334,11 +1340,11 @@ YY_DECL register int yy_act; struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; -#line 106 "libmemcached/csl/scanner.l" +#line 112 "libmemcached/csl/scanner.l" -#line 1342 "libmemcached/csl/scanner.cc" +#line 1348 "libmemcached/csl/scanner.cc" yylval = yylval_param; @@ -1422,28 +1428,28 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 109 "libmemcached/csl/scanner.l" +#line 115 "libmemcached/csl/scanner.l" { return yytext[0];} YY_BREAK case 2: YY_RULE_SETUP -#line 111 "libmemcached/csl/scanner.l" +#line 117 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext); return (NUMBER); } YY_BREAK case 3: YY_RULE_SETUP -#line 113 "libmemcached/csl/scanner.l" +#line 119 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +1); return PORT; } YY_BREAK case 4: YY_RULE_SETUP -#line 115 "libmemcached/csl/scanner.l" +#line 121 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +2); return WEIGHT_START; } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP -#line 117 "libmemcached/csl/scanner.l" +#line 123 "libmemcached/csl/scanner.l" ; /* skip whitespace */ YY_BREAK case 6: @@ -1451,224 +1457,224 @@ case 6: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 120 "libmemcached/csl/scanner.l" +#line 126 "libmemcached/csl/scanner.l" { return COMMENT; } YY_BREAK case 7: YY_RULE_SETUP -#line 124 "libmemcached/csl/scanner.l" +#line 130 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; } YY_BREAK case 8: YY_RULE_SETUP -#line 126 "libmemcached/csl/scanner.l" +#line 132 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET; } YY_BREAK case 9: YY_RULE_SETUP -#line 128 "libmemcached/csl/scanner.l" +#line 134 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "libmemcached/csl/scanner.l" +#line 135 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; } YY_BREAK case 11: YY_RULE_SETUP -#line 130 "libmemcached/csl/scanner.l" +#line 136 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= CONFIGURE_FILE; } YY_BREAK case 12: YY_RULE_SETUP -#line 131 "libmemcached/csl/scanner.l" +#line 137 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= CONNECT_TIMEOUT; } YY_BREAK case 13: YY_RULE_SETUP -#line 132 "libmemcached/csl/scanner.l" +#line 138 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= DISTRIBUTION; } YY_BREAK case 14: YY_RULE_SETUP -#line 133 "libmemcached/csl/scanner.l" +#line 139 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= HASH_WITH_NAMESPACE; } YY_BREAK case 15: YY_RULE_SETUP -#line 134 "libmemcached/csl/scanner.l" +#line 140 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= HASH; } YY_BREAK case 16: YY_RULE_SETUP -#line 135 "libmemcached/csl/scanner.l" +#line 141 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_BYTES_WATERMARK; } YY_BREAK case 17: YY_RULE_SETUP -#line 136 "libmemcached/csl/scanner.l" +#line 142 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_KEY_PREFETCH; } YY_BREAK case 18: YY_RULE_SETUP -#line 137 "libmemcached/csl/scanner.l" +#line 143 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= IO_MSG_WATERMARK; } YY_BREAK case 19: YY_RULE_SETUP -#line 138 "libmemcached/csl/scanner.l" +#line 144 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NOREPLY; } YY_BREAK case 20: YY_RULE_SETUP -#line 139 "libmemcached/csl/scanner.l" +#line 145 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NUMBER_OF_REPLICAS; } YY_BREAK case 21: YY_RULE_SETUP -#line 140 "libmemcached/csl/scanner.l" +#line 146 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POLL_TIMEOUT; } YY_BREAK case 22: YY_RULE_SETUP -#line 141 "libmemcached/csl/scanner.l" +#line 147 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RANDOMIZE_REPLICA_READ; } YY_BREAK case 23: YY_RULE_SETUP -#line 142 "libmemcached/csl/scanner.l" +#line 148 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RCV_TIMEOUT; } YY_BREAK case 24: YY_RULE_SETUP -#line 143 "libmemcached/csl/scanner.l" +#line 149 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= REMOVE_FAILED_SERVERS; } YY_BREAK case 25: YY_RULE_SETUP -#line 144 "libmemcached/csl/scanner.l" +#line 150 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RETRY_TIMEOUT; } YY_BREAK case 26: YY_RULE_SETUP -#line 145 "libmemcached/csl/scanner.l" +#line 151 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SND_TIMEOUT; } YY_BREAK case 27: YY_RULE_SETUP -#line 146 "libmemcached/csl/scanner.l" +#line 152 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_RECV_SIZE; } YY_BREAK case 28: YY_RULE_SETUP -#line 147 "libmemcached/csl/scanner.l" +#line 153 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_SEND_SIZE; } YY_BREAK case 29: YY_RULE_SETUP -#line 148 "libmemcached/csl/scanner.l" +#line 154 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SORT_HOSTS; } YY_BREAK case 30: YY_RULE_SETUP -#line 149 "libmemcached/csl/scanner.l" +#line 155 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SUPPORT_CAS; } YY_BREAK case 31: YY_RULE_SETUP -#line 150 "libmemcached/csl/scanner.l" +#line 156 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPALIVE; } YY_BREAK case 32: YY_RULE_SETUP -#line 151 "libmemcached/csl/scanner.l" +#line 157 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPIDLE; } YY_BREAK case 33: YY_RULE_SETUP -#line 152 "libmemcached/csl/scanner.l" +#line 158 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_NODELAY; } YY_BREAK case 34: YY_RULE_SETUP -#line 153 "libmemcached/csl/scanner.l" +#line 159 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= USE_UDP; } YY_BREAK case 35: YY_RULE_SETUP -#line 154 "libmemcached/csl/scanner.l" +#line 160 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= USER_DATA; } YY_BREAK case 36: YY_RULE_SETUP -#line 155 "libmemcached/csl/scanner.l" +#line 161 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= VERIFY_KEY; } YY_BREAK case 37: YY_RULE_SETUP -#line 157 "libmemcached/csl/scanner.l" +#line 163 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MIN; } YY_BREAK case 38: YY_RULE_SETUP -#line 158 "libmemcached/csl/scanner.l" +#line 164 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MAX; } YY_BREAK case 39: YY_RULE_SETUP -#line 160 "libmemcached/csl/scanner.l" +#line 166 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= NAMESPACE; } YY_BREAK case 40: YY_RULE_SETUP -#line 162 "libmemcached/csl/scanner.l" +#line 168 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= FETCH_VERSION; } YY_BREAK case 41: YY_RULE_SETUP -#line 164 "libmemcached/csl/scanner.l" +#line 170 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= INCLUDE; } YY_BREAK case 42: YY_RULE_SETUP -#line 165 "libmemcached/csl/scanner.l" +#line 171 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= RESET; } YY_BREAK case 43: YY_RULE_SETUP -#line 166 "libmemcached/csl/scanner.l" +#line 172 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= PARSER_DEBUG; } YY_BREAK case 44: YY_RULE_SETUP -#line 167 "libmemcached/csl/scanner.l" +#line 173 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= SERVERS; } YY_BREAK case 45: YY_RULE_SETUP -#line 168 "libmemcached/csl/scanner.l" +#line 174 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= END; } YY_BREAK case 46: YY_RULE_SETUP -#line 169 "libmemcached/csl/scanner.l" +#line 175 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return yyextra->previous_token= ERROR; } YY_BREAK case 47: YY_RULE_SETUP -#line 171 "libmemcached/csl/scanner.l" +#line 177 "libmemcached/csl/scanner.l" { return yyextra->previous_token= TRUE; } YY_BREAK case 48: YY_RULE_SETUP -#line 172 "libmemcached/csl/scanner.l" +#line 178 "libmemcached/csl/scanner.l" { return yyextra->previous_token= FALSE; } YY_BREAK case 49: YY_RULE_SETUP -#line 175 "libmemcached/csl/scanner.l" +#line 181 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN_OPTION; @@ -1676,67 +1682,67 @@ YY_RULE_SETUP YY_BREAK case 50: YY_RULE_SETUP -#line 180 "libmemcached/csl/scanner.l" +#line 186 "libmemcached/csl/scanner.l" { return CONSISTENT; } YY_BREAK case 51: YY_RULE_SETUP -#line 181 "libmemcached/csl/scanner.l" +#line 187 "libmemcached/csl/scanner.l" { return MODULA; } YY_BREAK case 52: YY_RULE_SETUP -#line 182 "libmemcached/csl/scanner.l" +#line 188 "libmemcached/csl/scanner.l" { return RANDOM; } YY_BREAK case 53: YY_RULE_SETUP -#line 184 "libmemcached/csl/scanner.l" +#line 190 "libmemcached/csl/scanner.l" { return MD5; } YY_BREAK case 54: YY_RULE_SETUP -#line 185 "libmemcached/csl/scanner.l" +#line 191 "libmemcached/csl/scanner.l" { return CRC; } YY_BREAK case 55: YY_RULE_SETUP -#line 186 "libmemcached/csl/scanner.l" +#line 192 "libmemcached/csl/scanner.l" { return FNV1_64; } YY_BREAK case 56: YY_RULE_SETUP -#line 187 "libmemcached/csl/scanner.l" +#line 193 "libmemcached/csl/scanner.l" { return FNV1A_64; } YY_BREAK case 57: YY_RULE_SETUP -#line 188 "libmemcached/csl/scanner.l" +#line 194 "libmemcached/csl/scanner.l" { return FNV1_32; } YY_BREAK case 58: YY_RULE_SETUP -#line 189 "libmemcached/csl/scanner.l" +#line 195 "libmemcached/csl/scanner.l" { return FNV1A_32; } YY_BREAK case 59: YY_RULE_SETUP -#line 190 "libmemcached/csl/scanner.l" +#line 196 "libmemcached/csl/scanner.l" { return HSIEH; } YY_BREAK case 60: YY_RULE_SETUP -#line 191 "libmemcached/csl/scanner.l" +#line 197 "libmemcached/csl/scanner.l" { return MURMUR; } YY_BREAK case 61: YY_RULE_SETUP -#line 192 "libmemcached/csl/scanner.l" +#line 198 "libmemcached/csl/scanner.l" { return JENKINS; } YY_BREAK case 62: YY_RULE_SETUP -#line 194 "libmemcached/csl/scanner.l" +#line 200 "libmemcached/csl/scanner.l" { yyextra->hostname(yytext, yyleng, yylval->server); return IPADDRESS; @@ -1744,7 +1750,7 @@ YY_RULE_SETUP YY_BREAK case 63: YY_RULE_SETUP -#line 199 "libmemcached/csl/scanner.l" +#line 205 "libmemcached/csl/scanner.l" { if (yyextra->is_server()) { @@ -1761,7 +1767,7 @@ YY_RULE_SETUP case 64: /* rule 64 can match eol */ YY_RULE_SETUP -#line 212 "libmemcached/csl/scanner.l" +#line 218 "libmemcached/csl/scanner.l" { config_get_text(yyscanner)[yyleng -1]= 0; yyextra->string_buffer(yytext +1, yyleng -2, yylval->string); @@ -1770,7 +1776,7 @@ YY_RULE_SETUP YY_BREAK case 65: YY_RULE_SETUP -#line 218 "libmemcached/csl/scanner.l" +#line 224 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN; @@ -1778,10 +1784,10 @@ YY_RULE_SETUP YY_BREAK case 66: YY_RULE_SETUP -#line 223 "libmemcached/csl/scanner.l" +#line 229 "libmemcached/csl/scanner.l" ECHO; YY_BREAK -#line 1785 "libmemcached/csl/scanner.cc" +#line 1791 "libmemcached/csl/scanner.cc" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2910,7 +2916,7 @@ void config_free (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 223 "libmemcached/csl/scanner.l" +#line 229 "libmemcached/csl/scanner.l" diff --git a/libmemcached/csl/scanner.h b/libmemcached/csl/scanner.h index 980ebd11..34c5a3ac 100644 --- a/libmemcached/csl/scanner.h +++ b/libmemcached/csl/scanner.h @@ -23,12 +23,18 @@ #pragma GCC diagnostic ignored "-Wshorten-64-to-32" #endif +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + #define YY_EXTRA_TYPE Context* -#line 32 "libmemcached/csl/scanner.h" +#line 38 "libmemcached/csl/scanner.h" #define YY_INT_ALIGNED short int @@ -361,9 +367,9 @@ extern int config_lex \ #undef YY_DECL #endif -#line 223 "libmemcached/csl/scanner.l" +#line 229 "libmemcached/csl/scanner.l" -#line 368 "libmemcached/csl/scanner.h" +#line 374 "libmemcached/csl/scanner.h" #undef config_IN_HEADER #endif /* config_HEADER_H */ diff --git a/libmemcached/csl/scanner.l b/libmemcached/csl/scanner.l index e52b1fe4..5a341906 100644 --- a/libmemcached/csl/scanner.l +++ b/libmemcached/csl/scanner.l @@ -55,6 +55,12 @@ #pragma GCC diagnostic ignored "-Wshorten-64-to-32" #endif +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + #define YY_EXTRA_TYPE Context* } diff --git a/tests/keys.hpp b/tests/keys.hpp index 342346fc..11b7c061 100644 --- a/tests/keys.hpp +++ b/tests/keys.hpp @@ -35,6 +35,9 @@ */ +#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H +#include +#endif struct keys_st { public: @@ -59,9 +62,9 @@ public: key_buffer.resize(padding +1); memset(&key_buffer[0], 'x', padding); - if (HAVE_LIBUUID) + if (HAVE_UUID_UUID_H) { -#if defined(HAVE_LIBUUID) && HAVE_LIBUUID +#if defined(HAVE_UUID_UUID_H) && HAVE_UUID_UUID_H uuid_t out; uuid_generate(out); -- 2.30.2