gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Bernd's CheckFunc Fix


From: Fred Wright
Subject: [gpsd-dev] Bernd's CheckFunc Fix
Date: Mon, 19 Dec 2016 15:35:31 -0800 (PST)

Now that I've moved the compiler warning setup in fde48f55, it's time to
see whether that fixes the CheckFunc problem that motivated the creation
of CheckFuncFor_Wstrict_prototypes().

Bernd - I hope you're paying attention, since AFAIK you're the only one
who can reproduce the problem.  Testing isn't *too* difficult, but since
actually reverting your commit requires resoving a conflict, an easier
approach is just to patch the one call on CheckFuncFor_Wstrict_prototypes
to use the normal CheckFunc, as follows:

diff --git a/SConstruct b/SConstruct
index 57da353a..1e6ca673 100644
--- a/SConstruct
+++ b/SConstruct
@@ -796,7 +796,7 @@ else:
     # check function after libraries, because some function require libraries
     # for example clock_gettime() require librt on Linux glibc < 2.17
     for f in ("daemon", "strlcpy", "strlcat", "clock_gettime", "strptime", 
"gmtime_r" ):
-        if config.CheckFuncFor_Wstrict_prototypes(f):
+        if config.CheckFunc(f):
             confdefs.append("#define HAVE_%s 1\n" % f.upper())
         else:
             confdefs.append("/* #undef HAVE_%s */\n" % f.upper())

To test this:

1) Check out any version of the code prior to fde48f55 (the tip of master
at the time of this writing).

2) Apply the above patch.

3) Verify that it still fails.  If not, it's up to you how much effort you
want to put into investigating what changed.

4) Check out fde48f55 or later.

5) Apply the above patch.

6) See whether that fixes the problem.

7) Report back.

Given that it can be seen from config.log that -Wstrict-prototypes is no
longer present in the CheckFunc compiler invocations, if I don't hear
anything soon I'll assume that the problem is fixed and revert your
change.

Of course it would still be nice to know how a warning became an error.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]