mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
repaired build on mac after libtiff update
This commit is contained in:
parent
396aa53e96
commit
641c2ba83e
8
3rdparty/include/tiffconf.h
vendored
8
3rdparty/include/tiffconf.h
vendored
@ -26,13 +26,21 @@
|
||||
#define TIFF_INT64_FORMAT "%I64d"
|
||||
|
||||
/* Signed 64-bit type */
|
||||
#ifdef _MSC_VER
|
||||
#define TIFF_INT64_T signed __int64
|
||||
#else
|
||||
#define TIFF_INT64_T long long
|
||||
#endif
|
||||
|
||||
/* Unsigned 64-bit type formatter */
|
||||
#define TIFF_UINT64_FORMAT "%I64u"
|
||||
|
||||
/* Unsigned 64-bit type */
|
||||
#ifdef _MSC_VER
|
||||
#define TIFF_UINT64_T unsigned __int64
|
||||
#else
|
||||
#define TIFF_UINT64_T unsigned long long
|
||||
#endif
|
||||
|
||||
/* Compatibility stuff. */
|
||||
|
||||
|
2
3rdparty/include/tiffio.h
vendored
2
3rdparty/include/tiffio.h
vendored
@ -64,7 +64,7 @@ typedef uint16 tsample_t; /* sample number */
|
||||
typedef uint32 tstrile_t; /* strip or tile number */
|
||||
typedef tstrile_t tstrip_t; /* strip number */
|
||||
typedef tstrile_t ttile_t; /* tile number */
|
||||
typedef int32 tsize_t; /* i/o size in bytes */
|
||||
typedef size_t tsize_t; /* i/o size in bytes */
|
||||
typedef void* tdata_t; /* image data ref */
|
||||
typedef uint32 toff_t; /* file offset */
|
||||
|
||||
|
9
3rdparty/libtiff/tif_config.h
vendored
9
3rdparty/libtiff/tif_config.h
vendored
@ -32,11 +32,18 @@
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Signed 64-bit type */
|
||||
#define TIFF_INT64_T signed __int64
|
||||
|
||||
/* Unsigned 64-bit type */
|
||||
#define TIFF_UINT64_T unsigned __int64
|
||||
#else
|
||||
/* Signed 64-bit type */
|
||||
#define TIFF_INT64_T long long
|
||||
/* Signed 64-bit type */
|
||||
#define TIFF_UINT64_T unsigned long long
|
||||
#endif
|
||||
|
||||
/* Set the native cpu bit order */
|
||||
#define HOST_FILLORDER FILLORDER_LSB2MSB
|
||||
|
16
3rdparty/libtiff/tif_dirinfo.c
vendored
16
3rdparty/libtiff/tif_dirinfo.c
vendored
@ -771,6 +771,22 @@ _TIFFFindFieldInfo(TIFF* tif, ttag_t tag, TIFFDataType dt)
|
||||
return tif->tif_foundfield = (ret ? *ret : NULL);
|
||||
}
|
||||
|
||||
#undef lfind
|
||||
static void *
|
||||
lfind(const void *key, const void *base, size_t *nmemb, size_t size,
|
||||
int(*compar)(const void *, const void *))
|
||||
{
|
||||
char *element, *end;
|
||||
|
||||
end = (char *)base + *nmemb * size;
|
||||
for (element = (char *)base; element < end; element += size)
|
||||
if (!compar(element, key)) /* key found */
|
||||
return element;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const TIFFFieldInfo*
|
||||
_TIFFFindFieldInfoByName(TIFF* tif, const char *field_name, TIFFDataType dt)
|
||||
{
|
||||
|
4
3rdparty/libtiff/tif_unix.c
vendored
4
3rdparty/libtiff/tif_unix.c
vendored
@ -46,10 +46,6 @@
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IO_H
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#include "tiffiop.h"
|
||||
|
||||
static tsize_t
|
||||
|
@ -66,8 +66,14 @@ using namespace std;
|
||||
|
||||
struct TempDirHolder
|
||||
{
|
||||
const string temp_folder;
|
||||
TempDirHolder() { char* p = tmpnam(0); if(p[0] == '\\') p++; temp_folder = p; exec_cmd("mkdir " + temp_folder); }
|
||||
string temp_folder;
|
||||
TempDirHolder()
|
||||
{
|
||||
char* p = tmpnam(0);
|
||||
if(p[0] == '\\') p++;
|
||||
temp_folder = string(p);
|
||||
exec_cmd("mkdir " + temp_folder);
|
||||
}
|
||||
~TempDirHolder() { exec_cmd("rm -rf " + temp_folder); }
|
||||
static void exec_cmd(const string& cmd) { marker(cmd); int res = system( cmd.c_str() ); (void)res; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user