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

Re: C99 code in utf8proc.h

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 28 Feb 2014 21:47:06 +0100

On 28.02.2014 21:20, Branko Čibej wrote:
> On 28.02.2014 20:15, Philip Martin wrote:
>> The introduction of utf8proc in libsvn_subr has brought this code in
>> utf8proc.h:
>>
>> #ifdef _MSC_VER
>> typedef signed char int8_t;
>> typedef unsigned char uint8_t;
>> typedef short int16_t;
>> typedef unsigned short uint16_t;
>> typedef int int32_t;
>> #ifdef _WIN64
>> #define ssize_t __int64
>> #else
>> #define ssize_t int
>> #endif
>> typedef unsigned char bool;
>> enum {false, true};
>> #else
>> #include <stdbool.h>
>> #include <inttypes.h>
>> #endif
>>
>> stdbool.h and inttypes.h are from C99 and are not part of C89 so a
>> strictly conforming C89 compiler rejects this code. If we were to use
>> the Windows code, typdef and enum, on all platforms we could remove the
>> C99 code. We could relax our C89 requirements but it seems a bit silly
>> to do it for something as trivial as this.
>
> We should add configury to define HAVE_STDBOOL_H and HAVE_INTTYPES_H,
> and only define our own types if these aren't defined. I'd leave the
> MSVC-specific bits alone.

Philip: Can you try the Solaris build with r1573069, please?

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2014-02-28 21:47:42 CET

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.