Skip to content

Commit

Permalink
Merge pull request #205 from devurandom/fix/leptonica-1.73-compat
Browse files Browse the repository at this point in the history
Compatibility with Leptonica 1.73
  • Loading branch information
zdenop committed Jan 31, 2016
2 parents cd3ea07 + 6072814 commit ec44221
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions opencl/openclwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
#include <stdio.h>
#include <mach/mach_time.h>
#endif

/*
Convenience macro to test the version of Leptonica.
*/
#if defined(LIBLEPT_MAJOR_VERSION) && defined(LIBLEPT_MINOR_VERSION)
# define TESSERACT_LIBLEPT_PREREQ(maj, min) \
((LIBLEPT_MAJOR_VERSION) > (maj) || ((LIBLEPT_MAJOR_VERSION) == (maj) && (LIBLEPT_MINOR_VERSION) >= (min)))
#else
# define TESSERACT_LIBLEPT_PREREQ(maj, min) 0
#endif

#if TESSERACT_LIBLEPT_PREREQ(1,73)
# define CALLOC LEPT_CALLOC
# define FREE LEPT_FREE
#endif

#ifdef USE_OPENCL

#include "opencl_device_selection.h"
Expand Down

0 comments on commit ec44221

Please sign in to comment.