LibTIFF 4.7.2
TIFF library public API and implementation reference
Loading...
Searching...
No Matches
tiff_bounds_safety.h
Go to the documentation of this file.
1/* tiff_bounds_safety.h - portability macros for optional -fbounds-safety
2 *
3 * Copyright (c) 2026 Jeff Bindel
4 *
5 * Permission to use, copy, modify, distribute, and sell this software and
6 * its documentation for any purpose is hereby granted without fee, provided
7 * that (i) the above copyright notices and this permission notice appear in
8 * all copies of the software and related documentation, and (ii) the names of
9 * Sam Leffler and Silicon Graphics may not be used in any advertising or
10 * publicity relating to the software without the specific, prior written
11 * permission of Sam Leffler and Silicon Graphics.
12 *
13 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 */
17
30#ifndef TIFF_BOUNDS_SAFETY_H
31#define TIFF_BOUNDS_SAFETY_H
32
33#if defined(TIFF_ENABLE_COUNTED_BY) && !defined(__cplusplus) && \
34 defined(__has_attribute)
35#if __has_attribute(counted_by_or_null)
36#define TIFF_COUNTED_BY_OR_NULL(n) __attribute__((counted_by_or_null(n)))
37#endif
38#endif
39
40#ifndef TIFF_COUNTED_BY_OR_NULL
54#define TIFF_COUNTED_BY_OR_NULL(n)
55#endif
56
57#endif