From: Andrei Alexandrescu Date: Sat, 15 Feb 2014 01:41:14 +0000 (-0800) Subject: Use standard variadic macros instead of gcc-specific ones X-Git-Tag: v0.22.0~694 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=23bddf528ca318437b5345d4fc9648a91ae9572b Use standard variadic macros instead of gcc-specific ones Summary: We've intentionally eliminated support for gcc's old variadic macro syntax so as to bring our close in line with compatbile standards. This diff enables folly to build using warp. Test Plan: built folly Reviewed By: delong.j@fb.com FB internal diff: D1176956 --- diff --git a/folly/test/MPMCQueueTest.cpp b/folly/test/MPMCQueueTest.cpp index 36186929..5bb2fa7b 100644 --- a/folly/test/MPMCQueueTest.cpp +++ b/folly/test/MPMCQueueTest.cpp @@ -326,8 +326,8 @@ TEST(MPMCQueue, mt_prod_cons_deterministic) { "", 10, 10, 1000); } -#define PC_BENCH(q, np, nc, nops...) \ - producerConsumerBench(q, #q, (np), (nc), nops) +#define PC_BENCH(q, np, nc, ...) \ + producerConsumerBench(q, #q, (np), (nc), __VA_ARGS__) TEST(MPMCQueue, mt_prod_cons) { int n = 100000; @@ -433,7 +433,7 @@ static void lc_snap() { } } -#define LIFECYCLE_STEP(args...) lc_step(__LINE__, args) +#define LIFECYCLE_STEP(...) lc_step(__LINE__, __VA_ARGS__) static void lc_step(int lineno, int what = NOTHING, int what2 = NOTHING) { for (int i = 0; i < MAX_LIFECYCLE_EVENT; ++i) { @@ -636,4 +636,3 @@ int main(int argc, char ** argv) { google::ParseCommandLineFlags(&argc, &argv, true); return RUN_ALL_TESTS(); } -