|
Packit |
08bd4c |
/*-
|
|
Packit |
08bd4c |
* Copyright (c) 2003-2007 Tim Kientzle
|
|
Packit |
08bd4c |
* All rights reserved.
|
|
Packit |
08bd4c |
*
|
|
Packit |
08bd4c |
* Redistribution and use in source and binary forms, with or without
|
|
Packit |
08bd4c |
* modification, are permitted provided that the following conditions
|
|
Packit |
08bd4c |
* are met:
|
|
Packit |
08bd4c |
* 1. Redistributions of source code must retain the above copyright
|
|
Packit |
08bd4c |
* notice, this list of conditions and the following disclaimer.
|
|
Packit |
08bd4c |
* 2. Redistributions in binary form must reproduce the above copyright
|
|
Packit |
08bd4c |
* notice, this list of conditions and the following disclaimer in the
|
|
Packit |
08bd4c |
* documentation and/or other materials provided with the distribution.
|
|
Packit |
08bd4c |
*
|
|
Packit |
08bd4c |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
|
|
Packit |
08bd4c |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
Packit |
08bd4c |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
Packit |
08bd4c |
* IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
Packit |
08bd4c |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
Packit |
08bd4c |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
Packit |
08bd4c |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
Packit |
08bd4c |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
Packit |
08bd4c |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
Packit |
08bd4c |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
08bd4c |
*
|
|
Packit |
08bd4c |
* $FreeBSD: src/usr.bin/cpio/cpio_platform.h,v 1.2 2008/12/06 07:15:42 kientzle Exp $
|
|
Packit |
08bd4c |
*/
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
/*
|
|
Packit |
08bd4c |
* This header is the first thing included in any of the cpio
|
|
Packit |
08bd4c |
* source files. As far as possible, platform-specific issues should
|
|
Packit |
08bd4c |
* be dealt with here and not within individual source files.
|
|
Packit |
08bd4c |
*/
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
#ifndef CPIO_PLATFORM_H_INCLUDED
|
|
Packit |
08bd4c |
#define CPIO_PLATFORM_H_INCLUDED
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
#if defined(PLATFORM_CONFIG_H)
|
|
Packit |
08bd4c |
/* Use hand-built config.h in environments that need it. */
|
|
Packit |
08bd4c |
#include PLATFORM_CONFIG_H
|
|
Packit |
08bd4c |
#else
|
|
Packit |
08bd4c |
/* Read config.h or die trying. */
|
|
Packit |
08bd4c |
#include "config.h"
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
#if defined(_WIN32) && !defined(__CYGWIN__)
|
|
Packit |
08bd4c |
#include "cpio_windows.h"
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
/* Get a real definition for __FBSDID if we can */
|
|
Packit |
08bd4c |
#if HAVE_SYS_CDEFS_H
|
|
Packit |
08bd4c |
#include <sys/cdefs.h>
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
/* If not, define it so as to avoid dangling semicolons. */
|
|
Packit |
08bd4c |
#ifndef __FBSDID
|
|
Packit |
08bd4c |
#define __FBSDID(a) struct _undefined_hack
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
#ifdef HAVE_LIBARCHIVE
|
|
Packit |
08bd4c |
/* If we're using the platform libarchive, include system headers. */
|
|
Packit |
08bd4c |
#include <archive.h>
|
|
Packit |
08bd4c |
#include <archive_entry.h>
|
|
Packit |
08bd4c |
#else
|
|
Packit |
08bd4c |
/* Otherwise, include user headers. */
|
|
Packit |
08bd4c |
#include "archive.h"
|
|
Packit |
08bd4c |
#include "archive_entry.h"
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
/* How to mark functions that don't return. */
|
|
Packit |
08bd4c |
#if defined(__GNUC__) && (__GNUC__ > 2 || \
|
|
Packit |
08bd4c |
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
|
|
Packit |
08bd4c |
#define __LA_DEAD __attribute__((__noreturn__))
|
|
Packit |
08bd4c |
#else
|
|
Packit |
08bd4c |
#define __LA_DEAD
|
|
Packit |
08bd4c |
#endif
|
|
Packit |
08bd4c |
|
|
Packit |
08bd4c |
#endif /* !CPIO_PLATFORM_H_INCLUDED */
|