Path: blob/main/contrib/libarchive/cpio/cpio_platform.h
39488 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 cpio9* source files. As far as possible, platform-specific issues should10* be dealt with here and not within individual source files.11*/1213#ifndef CPIO_PLATFORM_H_INCLUDED14#define CPIO_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/* Read config.h or die trying. */21#include "config.h"22#endif2324#if defined(_WIN32) && !defined(__CYGWIN__)25#include "cpio_windows.h"26#endif2728#ifdef HAVE_LIBARCHIVE29/* If we're using the platform libarchive, include system headers. */30#include <archive.h>31#include <archive_entry.h>32#else33/* Otherwise, include user headers. */34#include "archive.h"35#include "archive_entry.h"36#endif3738/* How to mark functions that don't return. */39#if defined(__GNUC__) && (__GNUC__ > 2 || \40(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))41#define __LA_NORETURN __attribute__((__noreturn__))42#elif defined(_MSC_VER)43#define __LA_NORETURN __declspec(noreturn)44#else45#define __LA_NORETURN46#endif4748#endif /* !CPIO_PLATFORM_H_INCLUDED */495051