[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: Bert Huijben <bert_at_qqmail.nl>
Date: Fri, 28 Feb 2014 20:23:22 +0100

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Sent: vrijdag 28 februari 2014 20:15
> To: dev_at_subversion.apache.org
> Subject: C99 code in utf8proc.h
>
> 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

Visual C++ 2013 adds <stdbool.h> and <inttypes.h> with these C99 typedefs,
so the code should really perform a better check than #ifdef _MSC_VER, but I
don't think this code will fail on newer compilers. (It compiles just fine
on 2005, 2008, 2010, 2012 and 2013)

        Bert
Received on 2014-02-28 20:24:04 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.