[Privoxy-devel] oops: Make poll() non-optional breaks privoxy on windows
Lee
ler762 at gmail.com
Mon Dec 14 13:54:49 UTC 2020
On 12/14/20, Fabian Keil <fk at fabiankeil.de> wrote:
> Lee <ler762 at gmail.com> wrote on 2020-12-14:
>
>> On 12/14/20, Fabian Keil <fk at fabiankeil.de> wrote:
>> > Lee <ler762 at gmail.com> wrote on 2020-12-14:
>> >
>> >> This seems to be the problem & needs to be backed out:
>> >> https://www.privoxy.org/gitweb/?p=privoxy.git;a=commit;h=9126f0c935e4bb64a87be7c3a1855b7768791142
>> >>
>> >> Windows doesn't seem to have poll:
>> >> Lee at i3668 /source/privoxy/privoxy
>> >> $ grep POLL *h
>> >> config.h:/* #undef HAVE_POLL */
>> >
>> > Oops indeed.
>> >
>> > Thanks for the report, I've reverted the commit for now.
>> >
>> > Does this mean the
>> > #warning poll() appears to be unavailable. Your platform will become
>> > unsupported in the future.
>> > is always triggered on Windows?
>>
>> I've never noticed it, but that might not mean a whole lot. Where
>> should I look for it?
>
> It's located in jcc.c but as it turns out it's only shown if _WIN32 isn't
> defined ...
If a '#warning xxx' only shows up at compile time maybe you should
consider something like this:
diff --git a/loadcfg.c b/loadcfg.c
index 124c8127..27de7422 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1991,6 +1991,16 @@ if ( 1 ) { /* XXX: keep? it's kind of nice
dumping stats to the log */
freez(config->logfile);
+ /* put warnings into the log */
+#ifndef HAVE_CALLOC
+ log_error(LOG_LEVEL_INFO,
+ "WARNING: calloc appears to be unavailable. Your
platform will become unsupported in the future");
+#endif
+#ifndef HAVE_POLL
+ log_error(LOG_LEVEL_INFO,
+ "WARNING: poll() appears to be unavailable. Your
platform will become unsupported in the future.");
+#endif
+
if (daemon_mode)
{
if (NULL != logfile)
which gives me this in the log
2020-12-14 08:51:50.413 000000f4 Info: WARNING: poll() appears to be
unavailable. Your platform will become unsupported in the future.
2020-12-14 08:51:50.413 000000f4 Info: Privoxy version 3.0.30
Lee
More information about the Privoxy-devel
mailing list