Add compatibility headers

In older versions of tidy, these headers were defined. Now, they are
renamed to tidybuffio.h and tidyplatform.h. This may be more of a
consistent naming scheme, but it breaks current software.

Re-add these headers and add compile time warning when such a header
is used.
This commit is contained in:
Adam Majer 2016-06-13 11:10:16 +02:00 committed by Adam Majer
parent 60c1dd1744
commit 30cc376f7b
3 changed files with 18 additions and 0 deletions

View file

@ -140,6 +140,12 @@ set ( CFILES
set ( HFILES set ( HFILES
${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h ${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h
${INCDIR}/tidybuffio.h ) ${INCDIR}/tidybuffio.h )
option (TIDY_COMPAT_HEADERS "If set to ON, compatability headers are included" OFF)
if (TIDY_COMPAT_HEADERS)
set ( HFILES ${HFILES} ${INCDIR}/buffio.h ${INCDIR}/platform.h )
endif ()
set ( LIBHFILES set ( LIBHFILES
${SRCDIR}/access.h ${SRCDIR}/attrs.h ${SRCDIR}/attrdict.h ${SRCDIR}/charsets.h ${SRCDIR}/access.h ${SRCDIR}/attrs.h ${SRCDIR}/attrdict.h ${SRCDIR}/charsets.h
${SRCDIR}/clean.h ${SRCDIR}/config.h ${SRCDIR}/entities.h ${SRCDIR}/clean.h ${SRCDIR}/config.h ${SRCDIR}/entities.h

6
include/buffio.h Normal file
View file

@ -0,0 +1,6 @@
#ifdef __GNUC__
#warning "FIXME: Using compatibility tidy header (buffio.h) that will go away!"
#endif
#include "tidybuffio.h"

6
include/platform.h Normal file
View file

@ -0,0 +1,6 @@
#ifdef __GNUC__
#warning "FIXME: Using compatibility tidy header (platform.h) that will go away!"
#endif
#include "tidyplatform.h"