Skip to content

Commit

Permalink
v3.2.1 commits and release notes (#1569)
Browse files Browse the repository at this point in the history
* Propagate OPENEXR_INSTALL_PKG_CONFIG to internal Imath (#1531)

* Propagate OPENEXR_INSTALL_PKG_CONFIG to internal Imath

If OpenEXR is installing a pkg-config file, then the internal Imath
build (if there is one) should install it, too.

Also, add an explicit release version variable to the .pc file.

This is in preparation for the python wheel build to pick up the
version settings from the pkg-config files.

Signed-off-by: Cary Phillips <cary@ilm.com>

* remove version= from OpenEXR.pc

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Remove check for _MSC_VER in internal_cpuid.h (#1528)

As noted in #1445, _MSC_VER should only be used to detect msvc, not
for Windows. The _WIN32 check should be sufficient. The extra check
for _MSC_VER fails when cross-compiling from Linux to Windows.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Fix warnings in multipartExamples.cpp (#1533)

* Fix warnings in multipartExamples.cpp

Signed-off-by: Cary Phillips <cary@ilm.com>

* fix indentation

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Fix warnings from cross-compiling with x86_64-w64-mingw32-gcc-posix (#1534)

* Fix compiler warnings from x86_64-w64-mingw32-g++-posix

* MSVCRT doesn't recognize printf("%l") so PRIu64 doesn't work, it
  expects "%I64u".

* Add to the cases that disable a strncpy warning

Signed-off-by: Cary Phillips <cary@ilm.com>

* %zu for size_t

Signed-off-by: Cary Phillips <cary@ilm.com>

* revert attempt to fix PRIu64 warnings

Signed-off-by: Cary Phillips <cary@ilm.com>

* revert blank line

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Fix OPENEXR_VERSION_HEX (#1539)

* Fix OPENEXR_VERSION_HEX

* fix syntax error
* remove unnecessary uint32_t cast
* add validation test

Signed-off-by: Cary Phillips <cary@ilm.com>

* Add #if statement with OPENEXR_VERSION_HEX

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* OPENEXR_INSTALL_PKG_CONFIG is on by default, even on Windows (#1541)

There seems to be no downside to generating the OpenEXR.pc file even
on Windows, so for consistency, apply the setting to all platforms.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Remove SPDX license identifier in LICENSE.md

Signed-off-by: Cary Phillips <cary@ilm.com>

* Python wheel setup gets version from OpenEXR.pc/Imath.pc (#1536)

* Python wheel setup gets version from OpenEXR.pc/Imath.pc

OpenEXR and Imath have indepdenent versions that may not match. The
.pc files appear to be the simplest way to extract the versions and
library suffixes.

Running pkg-config itself doesn't work on Windows, hence the manual
file parsing.

Signed-off-by: Cary Phillips <cary@ilm.com>

* =

Signed-off-by: Cary Phillips <cary@ilm.com>

* Remove -DOPENEXR_INSTALL_PKG_CONFIG=ON since it's now on by default

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Default value for chromaticities attribute constructor in exrstdattr (#1540)

Signed-off-by: Cary Phillips <cary@ilm.com>

* Update openexr_deps.bzl (#1565)

Signed-off-by: Vertexwahn <julian.amann@tum.de>

* Bazel: Improve module (#1562)

Signed-off-by: Vertexwahn <julian.amann@tum.de>

* Set build-shared:OFF for Static build (#1557)

Looks like this somehow we've been building shared when we meant to be
building static.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Omit OPENEXR_IMAGES_TAG from test image url if empty (#1560)

This allows the url for the test images to reference a local file:

  cmake -DOPENEXR_IMAGES_REPO=file:///my/clone/of/openexr-images -DOPENEXR_IMAGES_TAG=""

which avoids the remote downloading of the test images at cmake time.

Also, mention the test images in the install docs.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Clean up handling of libdeflate when linking static  (#1561)

* Set EXR_DEFLATE_LIB properly for static linking

This leads OpenEXRCore/CMakeLists.txt to do:

    target_link_libraries(OpenEXRCore PUBLIC libdeflate)

instead of:

    target_link_libraries(OpenEXRCore PUBLIC PkgConfig::deflate)

which is not recognized. With a target link library of
`PkgConfig::deflate`, the static build of the OpenEXR libraries builds
successfully, but configuring an application against those static
libraries fails, saying it can't find `PkgConfig::deflate`.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Add -ldeflate to pkgconfig for static builds

When static linking and referencing an external libdeflate (i.e. not
fetching and building internally), OpenEXR.pc needs -ldeflate.

This also adds a test for this condition to the CI's validation script.

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Don't trigger ci/bazel/ossfuzz builds on pushes/PRs to src/wrappers (#1532)

No need to rebuild/test OpenEXR on changes to the python wheels.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Set minimal permissions for workflow python-wheels.yml (#1530)

The exact same changes done on other workflows through the PR #1417

Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>

* Release notes for 3.2.1

Signed-off-by: Cary Phillips <cary@ilm.com>

* Fix Imf/Iex/IlmThread namespaces in python bindings and website code (#1568)

* Fix Imf/Iex/IlmThread namespaces in python bindings and website code

Use OPENEXR_NAMESPACE, IEX_NAMESPACE, ILMTHREAD_NAMESPACE instead of
Imf, Iex, IlmThread, to support custom settings.

Signed-off-by: Cary Phillips <cary@ilm.com>

* Use Iex:: namespace in example code instead of IEX_NAMESPACE

Requires this in all.cpp:

  namespace Iex = IEX_NAMESPACE;

Signed-off-by: Cary Phillips <cary@ilm.com>

* use #define Iex

Signed-off-by: Cary Phillips <cary@ilm.com>

* remove explicit Iex namespace

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>

* Bump version to 3.2.1

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
Signed-off-by: Vertexwahn <julian.amann@tum.de>
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
Co-authored-by: Vertexwahn <julian.amann@tum.de>
Co-authored-by: Diogo Teles Sant'Anna <diogoteles@google.com>
  • Loading branch information
3 people authored Sep 25, 2023
1 parent 456bf42 commit 737b270
Show file tree
Hide file tree
Showing 30 changed files with 786 additions and 670 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/bazel_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- '!**.md'
- '!website/**'
- 'website/src/**'
- '!src/wrappers/**'
pull_request:
branches-ignore:
- RB-2.*
Expand All @@ -33,6 +34,7 @@ on:
- '!**.md'
- '!website/**'
- 'website/src/**'
- '!src/wrappers/**'

permissions:
contents: read
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- '!website/**'
- 'website/src/**'
- '!bazel/**'
- '!src/wrappers/**'
pull_request:
branches-ignore:
- RB-2.*
Expand All @@ -36,6 +37,7 @@ on:
- '!website/**'
- 'website/src/**'
- '!bazel/**'
- '!src/wrappers/**'

permissions:
contents: read
Expand Down Expand Up @@ -118,7 +120,7 @@ jobs:
# Static, Release
- build: 4
build-type: Release
build-shared: 'ON'
build-shared: 'OFF'
cxx-standard: 17
cxx-compiler: g++
cc-compiler: gcc
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ossfuzz_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- '!**.md'
- '!website/**'
- '!bazel/**'
- '!src/wrappers/**'
pull_request:
branches-ignore:
- RB-2.*
Expand All @@ -29,6 +30,7 @@ on:
- '!**.md'
- '!website/**'
- '!bazel/**'
- '!src/wrappers/**'

permissions:
contents: read
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ on:
- 'website/src/**'
- '!bazel/**'

permissions:
contents: read

jobs:
build_wheels:
name: Build Python wheels
Expand Down
1,202 changes: 619 additions & 583 deletions CHANGES.md

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<!-- SPDX-License-Identifier: BSD-3-Clause -->
<!-- Copyright (c) Contributors to the OpenEXR Project -->

Copyright (c) Contributors to the OpenEXR Project. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
9 changes: 6 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenEXR Project.

module(
name = "openexr",
version = "0.0.0", # The version "0.0.0" is set here and will be patched within the Bazel Central Registry
compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "imath", version = "3.1.9")
bazel_dep(name = "libdeflate", version = "1.18")
bazel_dep(name = "imath", repo_name = "Imath", version = "3.1.9")
bazel_dep(name = "libdeflate", version = "1.19")
bazel_dep(name = "platforms", version = "0.0.7")
6 changes: 3 additions & 3 deletions bazel/third_party/openexr_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def openexr_deps():
http_archive,
name = "libdeflate",
build_file = "@com_openexr//:bazel/third_party/libdeflate.BUILD",
sha256 = "225d982bcaf553221c76726358d2ea139bb34913180b20823c782cede060affd",
strip_prefix = "libdeflate-1.18",
urls = ["https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.18.tar.gz"],
sha256 = "27bf62d71cd64728ff43a9feb92f2ac2f2bf748986d856133cc1e51992428c25",
strip_prefix = "libdeflate-1.19",
urls = ["https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz"],
)

maybe(
Expand Down
3 changes: 2 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ if(OPENEXR_INSTALL_PKG_CONFIG)
)
endfunction()
openexr_pkg_config_help(OpenEXR.pc.in)
message(STATUS "OpenEXR pkg-config generation enabled")
else()
message(STATUS "-- pkg-config generation disabled")
message(STATUS "OpenEXR pkg-config generation disabled")
endif()

###################################################
Expand Down
2 changes: 1 addition & 1 deletion cmake/OpenEXR.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name: OpenEXR
Description: OpenEXR image library
Version: @OPENEXR_VERSION@

Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix}
Libs: @exr_pthread_libs@ -L${libdir} -lOpenEXR${libsuffix} -lOpenEXRUtil${libsuffix} -lOpenEXRCore${libsuffix} -lIex${libsuffix} -lIlmThread${libsuffix} @EXR_DEFLATE_LDFLAGS@
Cflags: -I${includedir} -I${OpenEXR_includedir} @exr_pthread_cflags@
Requires: Imath

8 changes: 4 additions & 4 deletions cmake/OpenEXRConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
// clang-format on

// Version as a single hex number, e.g. 0x01000300 == 1.0.3
#define OPENEXR_VERSION_HEX \
((uint32_t (OPENEXR_VERSION_MAJOR) << 24) | \
(uint32_t (OPENEXR_VERSION_MINOR) << 16) | \
(uint32_t (OPENEXR_VERSION_PATCH) << 8))
#define OPENEXR_VERSION_HEX \
(((OPENEXR_VERSION_MAJOR) << 24) | \
((OPENEXR_VERSION_MINOR) << 16) | \
((OPENEXR_VERSION_PATCH) << 8))

// On modern versions of gcc & clang, __has_attribute can test support for
// __attribute__((attr)). Make sure it's safe for other compilers.
Expand Down
20 changes: 15 additions & 5 deletions cmake/OpenEXRSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ set(IEX_INTERNAL_NAMESPACE "Iex_${OPENEXR_VERSION_API}" CACHE STRING "Real names
set(IEX_NAMESPACE "Iex" CACHE STRING "Public namespace alias for Iex")

# Whether to generate and install a pkg-config file OpenEXR.pc
if (WIN32)
option(OPENEXR_INSTALL_PKG_CONFIG "Install OpenEXR.pc file" OFF)
else()
option(OPENEXR_INSTALL_PKG_CONFIG "Install OpenEXR.pc file" ON)
endif()

# Whether to enable threading. This can be disabled, although thread pool and tasks
# are still used, just processed immediately
Expand Down Expand Up @@ -167,6 +163,9 @@ if(NOT OPENEXR_FORCE_INTERNAL_DEFLATE)
include(FindPkgConfig)
pkg_check_modules(deflate IMPORTED_TARGET GLOBAL libdeflate)
set(CMAKE_IGNORE_PATH)
if (deflate_FOUND)
message(STATUS "Using libdeflate from ${deflate_LINK_LIBRARIES}")
endif()
endif()

if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND)
Expand Down Expand Up @@ -216,7 +215,13 @@ if(NOT TARGET PkgConfig::deflate AND NOT deflate_FOUND)
set(EXR_DEFLATE_LIB)
else()
set(EXR_DEFLATE_INCLUDE_DIR)
set(EXR_DEFLATE_LIB PkgConfig::deflate)
set(EXR_DEFLATE_LIB ${deflate_LIBRARIES})
# set EXR_DEFATE_LDFLAGS for OpenEXR.pc.in for static build
if (BUILD_SHARED_LIBS)
set(EXR_DEFLATE_LDFLAGS "")
else()
set(EXR_DEFLATE_LDFLAGS "-l${deflate_LIBRARIES}")
endif()
set(EXR_DEFLATE_SOURCES)
endif()

Expand Down Expand Up @@ -253,6 +258,11 @@ if(NOT TARGET Imath::Imath AND NOT Imath_FOUND)
FetchContent_GetProperties(Imath)
if(NOT Imath_POPULATED)
FetchContent_Populate(Imath)

# Propagate OpenEXR's setting for pkg-config generation to Imath:
# If OpenEXR is generating it, the internal Imath should, too.
set(IMATH_INSTALL_PKG_CONFIG ${OPENEXR_INSTALL_PKG_CONFIG})

# hrm, cmake makes Imath lowercase for the properties (to imath)
add_subdirectory(${imath_SOURCE_DIR} ${imath_BINARY_DIR})
endif()
Expand Down
39 changes: 28 additions & 11 deletions share/ci/scripts/linux/validate_openexr_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,42 @@ if [[ $# == "0" ]]; then
exit -1
fi

set -x

BUILD_ROOT=$1
SRC_ROOT=$2

# Locate OpenEXR.pc and set PKG_CONFIG_PATH accordingly

pkgconfig=$(find $BUILD_ROOT -name OpenEXR.pc)
pkgconfig=$(find $BUILD_ROOT -name OpenEXR.pc | head -1)

if [[ "$pkgconfig" == "" ]]; then
echo "Can't find OpenEXR.pc"
exit -1
fi

cat $pkgconfig

export PKG_CONFIG_PATH=$(dirname $pkgconfig)

# Build the validation program

CXX_FLAGS=$(pkg-config OpenEXR --cflags)
LD_FLAGS=$(pkg-config OpenEXR --libs --static)
CXX_FLAGS=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --cflags)
LD_FLAGS=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --libs --static)

VALIDATE_CPP=$(mktemp --tmpdir "validate_cpp_XXX.cpp")
VALIDATE_BIN=$(mktemp --tmpdir "validate_bin_XXX")
VALIDATE_BUILD=$(mktemp -d --tmpdir "validate_build_XXX")

VALIDATE_CPP=$(mktemp --tmpdir "validate_XXX.cpp")
VALIDATE_BIN=$(mktemp --tmpdir "validate_XXX")
trap "rm -rf $VALIDATE_CPP $VALIDATE_BIN" exit
trap "rm -rf $VALIDATE_CPP $VALIDATE_BIN $VALIDATE_BUILD" exit

echo -e '#include <ImfHeader.h>\n#include <OpenEXRConfig.h>\n#include <stdio.h>\nint main() { puts(OPENEXR_PACKAGE_STRING); Imf::Header h; return 0; }' > $VALIDATE_CPP

g++ $CXX_FLAGS $VALIDATE_CPP -o $VALIDATE_BIN $LD_FLAGS

# Execute the program

LIB_DIR=$(pkg-config OpenEXR --variable=libdir)
LIB_DIR=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --variable=libdir)
export LD_LIBRARY_PATH=$LIB_DIR

validate=`$VALIDATE_BIN`
Expand All @@ -62,15 +70,15 @@ if [[ "$status" != "0" ]]; then
fi

# Get the suffix, e.g. -2_5_d, and determine if there's also a _d
libsuffix=$(pkg-config OpenEXR --variable=libsuffix)
libsuffix=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --variable=libsuffix)
if [[ $libsuffix != $(basename ./$libsuffix _d) ]]; then
_d="_d"
else
_d=""
fi

# Validate each of the libs
libs=$(pkg-config OpenEXR --libs-only-l | sed -e s/-l//g)
libs=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --libs-only-l | sed -e s/-l//g)
for lib in $libs; do

base=$(echo $lib | cut -d- -f1)
Expand Down Expand Up @@ -105,13 +113,22 @@ if [[ "$?" == "0" ]]; then
fi

if [[ "$SRC_ROOT" != "" ]]; then
version=$(pkg-config OpenEXR --modversion)
version=$(env PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config OpenEXR --modversion)
notes=$(grep "\* \[Version $version\]" $SRC_ROOT/CHANGES.md | head -1)
if [[ "$notes" == "" ]]; then
echo "No release notes."
else
echo "Release notes: $notes"
fi
fi



# Confirm that the example programs build, link, and run

cd $VALIDATE_BUILD

cmake -DCMAKE_PREFIX_PATH=$BUILD_ROOT $SRC_ROOT/src/examples
cmake --build .
./bin/OpenEXRExamples

echo "ok."
2 changes: 1 addition & 1 deletion src/bin/exrstdattr/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ getChromaticities (
if (i > argc - 9)
throw invalid_argument("Expected 8 chromaticity values");

ChromaticitiesAttribute* a = new ChromaticitiesAttribute;
ChromaticitiesAttribute* a = new ChromaticitiesAttribute(Chromaticities());
attrs.push_back (SetAttr (attrName, part, a));

a->value ().red.x = static_cast<float> (strtod (argv[i + 1], 0));
Expand Down
12 changes: 6 additions & 6 deletions src/examples/multipartExamples.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void combineFiles ()

const char * filenames[] = {"gz1.exr", "tiledgz1.exr", "test.deep.exr", "testTiled.deep.exr"};

for (int i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
for (size_t i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
{
MultiPartInputFile * in_file = new MultiPartInputFile (filenames[i]);
Header header = in_file->header (0);
Expand All @@ -112,7 +112,7 @@ void combineFiles ()

MultiPartOutputFile outputFile ("multipart.exr", headers.data (), (int)headers.size ());

for (int i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
for (size_t i = 0; i < sizeof (filenames) / sizeof (filenames[0]); i++)
{
Header & header = headers[i];
const string& type = header.type ();
Expand Down Expand Up @@ -351,8 +351,8 @@ void modifyDeepChannels(Array2D<uint32_t> & sampleCount, list<Array2D<T *>> & ch
for (int x = 0; x < channel.width (); x++)
{
uint32_t count = sampleCount[y][x];
for (int j = 0; j < count; j++)
channel[y][x][j] += delta;
for (uint32_t j = 0; j < count; j++)
channel[y][x][j] += delta;
}
}
}
Expand Down Expand Up @@ -414,7 +414,7 @@ void modifyMultipart ()
Box2i dataWindow = header.dataWindow ();
OutputPart outputPart (outputFile, i);
outputPart.setFrameBuffer (frameBuffer);
outputPart.writePixels (header.dataWindow ().max.y - header.dataWindow ().min.y + 1);
outputPart.writePixels (dataWindow.max.y - dataWindow.min.y + 1);
}
else
{
Expand Down Expand Up @@ -466,7 +466,7 @@ void modifyMultipart ()
Box2i dataWindow = header.dataWindow ();
DeepScanLineOutputPart outputPart (outputFile, i);
outputPart.setFrameBuffer (frameBuffer);
outputPart.writePixels (header.dataWindow ().max.y - header.dataWindow ().min.y + 1);
outputPart.writePixels (dataWindow.max.y - dataWindow.min.y + 1);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXRCore/encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ default_compress_chunk (exr_encode_pipeline_t* encode)
return pctxt->print_error (
pctxt,
rv,
"error allocating buffer %lu",
"error allocating buffer %zu",
exr_compress_max_buffer_size (encode->packed_bytes));
//return rv;

Expand Down
4 changes: 2 additions & 2 deletions src/lib/OpenEXRCore/internal_cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#endif

#if OPENEXR_ENABLE_X86_SIMD_CHECK
# if defined(_MSC_VER) && defined(_WIN32)
# if defined(_WIN32)
# include <intrin.h>
# else
# include <cpuid.h>
Expand Down Expand Up @@ -51,7 +51,7 @@ check_for_x86_simd (int* f16c, int* avx, int* sse2)

#elif OPENEXR_ENABLE_X86_SIMD_CHECK

# if defined(_MSC_VER) && defined(_WIN32)
# if defined(_WIN32)
int regs[4]={0}, osxsave;

__cpuid (regs, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/OpenEXRCore/openexr_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

# define OPENEXR_VERSION_MAJOR 3
# define OPENEXR_VERSION_MINOR 2
# define OPENEXR_VERSION_PATCH 0
# define OPENEXR_VERSION_PATCH 1

#endif
5 changes: 5 additions & 0 deletions src/lib/OpenEXRCore/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,18 @@ exr_attr_string_set_with_length (
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable : 4996)
#elif __MSVCRT__ && __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
if (d)
strncpy (sstr, d, (size_t) len);
else
memset (sstr, 0, (size_t) len);
#ifdef _MSC_VER
# pragma warning(pop)
#elif __MSVCRT__ && __GNUC__
#pragma GCC diagnostic pop
#endif
}
sstr[len] = '\0';
Expand Down
Loading

0 comments on commit 737b270

Please sign in to comment.