1/* $NetBSD: formatcheck.h,v 1.1 2024/02/18 20:57:52 christos Exp $ */ 2 3/* 4 * Copyright (C) Internet Systems Consortium, Inc. ("ISC") 5 * 6 * SPDX-License-Identifier: MPL-2.0 7 * 8 * This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, you can obtain one at https://mozilla.org/MPL/2.0/. 11 * 12 * See the COPYRIGHT file distributed with this work for additional 13 * information regarding copyright ownership. 14 */ 15 16#ifndef ISC_FORMATCHECK_H 17#define ISC_FORMATCHECK_H 1 18 19/*! \file isc/formatcheck.h */ 20 21/*% 22 * ISC_FORMAT_PRINTF(). 23 * 24 * \li fmt is the location of the format string parameter. 25 * \li args is the location of the first argument (or 0 for no argument 26 * checking). 27 * 28 * Note: 29 * \li The first parameter is 1, not 0. 30 */ 31#ifdef __GNUC__ 32#define ISC_FORMAT_PRINTF(fmt, args) \ 33 __attribute__((__format__(__printf__, fmt, args))) 34#else /* ifdef __GNUC__ */ 35#define ISC_FORMAT_PRINTF(fmt, args) 36#endif /* ifdef __GNUC__ */ 37 38#endif /* ISC_FORMATCHECK_H */ 39