Path: blob/main/contrib/libarchive/cat/bsdcat_platform.h
39482 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2003-2007 Tim Kientzle4* All rights reserved.5*/67/*8* This header is the first thing included in any of the bsdtar9* source files. As far as possible, platform-specific issues should10* be dealt with here and not within individual source files.11*/1213#ifndef BSDCAT_PLATFORM_H_INCLUDED14#define BSDCAT_PLATFORM_H_INCLUDED1516#if defined(PLATFORM_CONFIG_H)17/* Use hand-built config.h in environments that need it. */18#include PLATFORM_CONFIG_H19#else20/* Not having a config.h of some sort is a serious problem. */21#include "config.h"22#endif2324#ifdef HAVE_LIBARCHIVE25/* If we're using the platform libarchive, include system headers. */26#include <archive.h>27#include <archive_entry.h>28#else29/* Otherwise, include user headers. */30#include "archive.h"31#include "archive_entry.h"32#endif3334/* How to mark functions that don't return. */35/* This facilitates use of some newer static code analysis tools. */36#undef __LA_NORETURN37#if defined(__GNUC__) && (__GNUC__ > 2 || \38(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))39#define __LA_NORETURN __attribute__((__noreturn__))40#elif defined(_MSC_VER)41#define __LA_NORETURN __declspec(noreturn)42#else43#define __LA_NORETURN44#endif4546#endif /* !BSDCAT_PLATFORM_H_INCLUDED */474849