Mailinglist Archive: opensuse-factory (649 mails)

< Previous Next >
Re: [opensuse-factory] Re: what happened to glibc's xlocale.h

On 25/08/2017 12:24, Jan Engelhardt wrote:

On Friday 2017-08-25 12:04, Dave Plater wrote:
I'll answer my own question, xlocale.h has been removed in glibc-26 and I
suspect can be replaced by locale.h, am I correct?

Any idea which macro contains the glibc version, I've searched high and low.
ie. #ifdefined __GLIBC_MAJOR but there only seems to be a __GLIBC_MINOR__

Ideally, there should be a configure-time check for xlocale.h
and then you would do

# include <xlocale.h>

That would be ideal but configure is non standard and there's no so I've made a spec macro:
%define glibc_ver %(ldd --version |grep ldd |cut -d " " -f 4)
and apply the patch according to the version.
Upstream seemed unsure about using locale.h for lower glibc versions so I'm going with caution.
Suppose I could add -D:GLIBC_VERSION= to the build instead.
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >