The definitions for towlower() and towupper() are defined in /usr/include/wctype.h on FreeBSD platforms. I just removed the define and used the ucd_ equivilent where towlower/towupper were found. /bin/sh ./libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -fPIC -fvisibility=hidden -pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"/usr/local/share/espeak- ng-data\" -DLIBESPEAK_NG_EXPORT -Isrc/include -Isrc/include/compat -I src/ucd-tools/src/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L -Wno-endif-lab els -g -O2 -std=c99 -MT src/libespeak-ng/src_libespeak_ng_la-readclause.lo -MD -MP -MF src/libespeak-ng/.deps/src_libespeak_ng_la-readclause.Tpo -c -o src/libespeak-n g/src_libespeak_ng_la-readclause.lo `test -f 'src/libespeak-ng/readclause.c' || echo './'`src/libespeak-ng/readclause.c libtool: compile: cc -DHAVE_CONFIG_H -I. -fPIC -fvisibility=hidden -pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"/usr/local/share/espeak-ng-data\" -DLIBESPEAK_NG_EXPO RT -Isrc/include -Isrc/include/compat -I src/ucd-tools/src/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L -Wno-endif-labels -g -O2 -std=c99 -MT src/li bespeak-ng/src_libespeak_ng_la-readclause.lo -MD -MP -MF src/libespeak-ng/.deps/src_libespeak_ng_la-readclause.Tpo -c src/libespeak-ng/readclause.c -fPIC -DPIC -o src/l ibespeak-ng/.libs/src_libespeak_ng_la-readclause.o In file included from src/libespeak-ng/readclause.c:32: In file included from src/include/compat/wctype.h:30: /usr/include/wctype.h:73:8: error: conflicting types for 'ucd_tolower' wint_t towlower(wint_t); ^ src/include/compat/wchar.h:37:18: note: expanded from macro 'towlower' ^ src/ucd-tools/src/include/ucd/ucd.h:503:13: note: previous declaration is here codepoint_t ucd_tolower(codepoint_t c); ^ In file included from src/libespeak-ng/readclause.c:32: In file included from src/include/compat/wctype.h:30: /usr/include/wctype.h:74:8: error: conflicting types for 'ucd_toupper' wint_t towupper(wint_t); ^ src/include/compat/wchar.h:38:18: note: expanded from macro 'towupper' ^ src/ucd-tools/src/include/ucd/ucd.h:491:13: note: previous declaration is here codepoint_t ucd_toupper(codepoint_t c); ^ src/libespeak-ng/readclause.c:366:19: warning: implicit declaration of function 'mkstemp' is invalid in C99 [-Wimplicit-function-declaration] if ((fd_temp = mkstemp(fname_temp)) >= 0) ^ 1 warning and 2 errors generated.master
#include <ucd/ucd.h> | #include <ucd/ucd.h> | ||||
#define towlower ucd_tolower | |||||
#define towupper ucd_toupper | |||||
#endif | #endif |
if (c == 'I' && translator->langopts.dotless_i) | if (c == 'I' && translator->langopts.dotless_i) | ||||
return 0x131; // I -> ı | return 0x131; // I -> ı | ||||
return towlower(c); | |||||
return ucd_tolower(c); | |||||
} | } | ||||
static int IsRomanU(unsigned int c) | static int IsRomanU(unsigned int c) | ||||
while (IsDigit09(*pw)) | while (IsDigit09(*pw)) | ||||
value = value*10 + *pw++ - '0'; | value = value*10 + *pw++ - '0'; | ||||
if ((type == 1) && (towlower(*pw) == 's')) { | |||||
if ((type == 1) && (ucd_tolower(*pw) == 's')) { | |||||
// time: seconds rather than ms | // time: seconds rather than ms | ||||
value *= 1000; | value *= 1000; | ||||
} | } |
// don't convert the case of the second character unless the next letter is also upper case | // don't convert the case of the second character unless the next letter is also upper case | ||||
c2 = new_c >> 16; | c2 = new_c >> 16; | ||||
if (upper_case && iswupper(next_in)) | if (upper_case && iswupper(next_in)) | ||||
c2 = towupper(c2); | |||||
c2 = ucd_toupper(c2); | |||||
*insert = c2; | *insert = c2; | ||||
new_c &= 0xffff; | new_c &= 0xffff; | ||||
} | } | ||||
if (upper_case) | if (upper_case) | ||||
new_c = towupper(new_c); | |||||
new_c = ucd_toupper(new_c); | |||||
*wordflags |= FLAG_CHAR_REPLACED; | *wordflags |= FLAG_CHAR_REPLACED; | ||||
return new_c; | return new_c; |
uprintf_is(out, c, *++format); | uprintf_is(out, c, *++format); | ||||
break; | break; | ||||
case 'L': /* lowercase */ | case 'L': /* lowercase */ | ||||
uprintf_codepoint(out, towlower(c), *++format); | |||||
uprintf_codepoint(out, ucd_tolower(c), *++format); | |||||
break; | break; | ||||
case 's': /* script */ | case 's': /* script */ | ||||
fputs(ucd_get_script_string(ucd_lookup_script(c)), out); | fputs(ucd_get_script_string(ucd_lookup_script(c)), out); | ||||
uprintf_codepoint(out, ucd_totitle(c), *++format); | uprintf_codepoint(out, ucd_totitle(c), *++format); | ||||
break; | break; | ||||
case 'U': /* uppercase */ | case 'U': /* uppercase */ | ||||
uprintf_codepoint(out, towupper(c), *++format); | |||||
uprintf_codepoint(out, ucd_toupper(c), *++format); | |||||
break; | break; | ||||
} | } | ||||
++format; | ++format; |