Commit 140810c3 authored by Daniel Brown's avatar Daniel Brown

fixin osx build

parent 67cf3078
......@@ -11,7 +11,6 @@
#if OS == MACOS
>>>>>>> master
//
// Copyright 2011-2014 NimbusKit
// Originally ported from https://github.com/ingenuitas/python-tesseract/blob/master/fmemopen.c
......@@ -29,12 +28,9 @@
// limitations under the License.
//
<<<<<<< HEAD
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
=======
>>>>>>> master
#include <sys/mman.h>
struct fmem {
......@@ -121,10 +117,8 @@ FILE *fmemopen(void *buf, size_t size, const char *mode) {
// funopen's man page: https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/funopen.3.html
return funopen(mem, readfn, writefn, seekfn, closefn);
}
<<<<<<< HEAD
=======
#elif OS == __WIN_32__ || OS == __WIN_64__
#elif defined(OSWIN) && !defined(__CYGWIN__)
/* Copyright (C) 2007-2010 Open Information Security Foundation
......
......@@ -22,7 +22,6 @@
extern "C" {
#endif
#if OS == MACOS
>>>>>>> master
/**
* A BSD port of the fmemopen Linux method using funopen.
*
......@@ -50,9 +49,7 @@ FILE *fmemopen(void *buf, size_t size, const char *mode);
}
#endif
<<<<<<< HEAD
=======
#elif OS == __WIN_32__ || OS == __WIN_64__
#elif defined(OSWIN) && !defined(__CYGWIN__)
/**
* Code based on GPL code from https://github.com/sightmachine/python-tesseract/blob/master/util-fmemopen.h
......@@ -61,6 +58,7 @@ FILE *fmemopen(void *buf, size_t size, const char *mode);
* Based on FMem.c of Alexandre Flori (2008/10/17 AF)
*/
FILE *fmemopen(void *, size_t, const char *);
#endif
#endif // #ifndef FMEMOPEN_H_
\ No newline at end of file
......@@ -25,13 +25,12 @@
*/
// this include stuff is for the function getNumCores
#if (OS==__WIN_32__ || OS==__WIN_64__) && __CYGWIN__
#if defined(OSWIN) && defined(__CYGWIN__)
#undef UCHAR // formulc.h defines this already and so does windows.h, so dont do it again!
#include <windows.h>
#include <tlhelp32.h>
#include <unistd.h>
#elif (OS==__WIN_32__ || OS == __WIN_64__) && !defined(__CYGWIN__)
#elif defined(OSWIN) && !defined(__CYGWIN__)
#undef UCHAR // formulc.h defines this already and so does windows.h, so dont do it again!
#include <windows.h>
// remove definitions that cause conflicts, as generally causes problems and original WIN32 defintions aren't used
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment