rhdunn / espeak

eSpeak NG is an open source speech synthesizer that supports 101 languages and accents.
http://reecedunn.co.uk/espeak-for-android
GNU General Public License v3.0
386 stars 16 forks source link

Freebsd build fixes #109

Closed twinshadow closed 7 years ago

twinshadow commented 7 years ago

Build fixes for #107

Two different issues fixed in this PR. The first deals with visibility of mkstemp() and M_PI in the system libraries by setting -D__BSD_VISIBLE in the CFLAGS using the configure script, the second deals with the name-collision of towlower() and towupper() also in the system libraries by removing the #define statements in src/include/compat/wchar.h and replacing the cases where the define is used with the ucd_ equivalent.

twinshadow commented 7 years ago

I just checked the build on OpenBSD, and it also hits the towlower/towupper name conflict without the patch.

  CC       src/libespeak-ng/src_libespeak_ng_la-readclause.lo
In file included from src/include/compat/wctype.h:30,
                 from src/libespeak-ng/readclause.c:32:
/usr/include/wctype.h:72: error: conflicting types for 'ucd_tolower'
src/ucd-tools/src/include/ucd/ucd.h:503: error: previous declaration of 'ucd_tolower' was here
/usr/include/wctype.h:73: error: conflicting types for 'ucd_toupper'
src/ucd-tools/src/include/ucd/ucd.h:491: error: previous declaration of 'ucd_toupper' was here
gmake[1]: *** [Makefile:1605: src/libespeak-ng/src_libespeak_ng_la-readclause.lo] Error 1