summaryrefslogtreecommitdiff
path: root/graphics/asymptote/tinyexr.cc
blob: 4a50c9d0f2ae8066f40d148dc48d6e893aea7f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @file tinyexr.cc
* @brief An implementation object file for tinyexr mandated by the repository.
*
* On Windows, use vcpkg to install zlib instead of nuget. On Linux, this should work naturally
*/

#include <zlib.h>

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#define TINYEXR_IMPLEMENTATION
#define TINYEXR_USE_MINIZ 0

#ifdef HAVE_PTHREAD
#define TINYEXR_USE_THREAD 1
#else
#define TINYEXR_USE_THREAD 0
#endif

#ifndef HAVE_STRNLEN
#include <cstring>
#include <iostream>

inline size_t strnlen(const char *s, size_t maxlen)
{
  const char *p=(const char *) memchr(s,0,maxlen);
  return p ? p-s : maxlen;
}
#endif

#include "cudareflect/tinyexr/tinyexr.h"