[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1381257 - sysinfo.c -

From: Branko Čibej <brane_at_wandisco.com>
Date: Tue, 11 Sep 2012 00:08:50 +0200

On 10.09.2012 23:16, Julian Foad wrote:
>> On 10.09.2012 22:33, Julian Foad wrote:
>>> Brane wrote:
>>> [...]
>>>
>>>> +#if LINUX
>>>> +static const char *linux_release_name(apr_pool_t *pool);
>>>> +#endif
>>> [...]
>>>
>>> On my Ubuntu GNU/Linux system:
>>>
>>> subversion/libsvn_subr/sysinfo.c:92:5: "LINUX" is not defined
>>> subversion/libsvn_subr/sysinfo.c:116:7: "LINUX" is not defined
>>> subversion/libsvn_subr/sysinfo.c:272:5: "LINUX" is not defined
>>>
>> That's extremely strange. It builds on my Ubuntu VM, where -DLINUX=2 is
>> in CFLAGS.
>> I think I can switch things around so that we don't have to depend on
>> that symbol, but I'd be interested to figure out why you don't get the
>> symbol.
> The string "LINUX" doesn't appear in my subversion WC including build outputs (except for the tests you added), nor anywhere in /usr/include except this one test:
>
> /usr/include/apr-1.0/apr_general.h:#if defined(CRAY) || (defined(__arm) && !defined(LINUX))
>
> "cpp -dM" prints out the preprocessor's predefined macros; it isn't there either:
>
> $ cpp -dM /dev/null | grep LINUX
> $ cpp --version
> cpp (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
>
> So where does it come from on your system, and what does it mean?

Interesting

$ /usr/bin/apr-1-config --cppflags
  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE

My best guess is that you're building APR yourself, and this is a
packager artefact. In other words, this was the wrong symbol to use.
I'll try __linux__, as Philip suggests.

-- Brane

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2012-09-11 00:09:27 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.