|
Packit Service |
569379 |
/*
|
|
Packit Service |
569379 |
* Copyright 2017 Red Hat Inc., Durham, North Carolina.
|
|
Packit Service |
569379 |
* All Rights Reserved.
|
|
Packit Service |
569379 |
*
|
|
Packit Service |
569379 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
569379 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
569379 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
569379 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
569379 |
*
|
|
Packit Service |
569379 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
569379 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
569379 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
569379 |
* Lesser General Public License for more details.
|
|
Packit Service |
569379 |
*
|
|
Packit Service |
569379 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
569379 |
* License along with this library; if not, write to the Free Software
|
|
Packit Service |
569379 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit Service |
569379 |
*
|
|
Packit Service |
569379 |
* Authors:
|
|
Packit Service |
569379 |
* Jan Černý <jcerny@redhat.com>
|
|
Packit Service |
569379 |
*/
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#ifndef OSCAP_COMPAT_H_
|
|
Packit Service |
569379 |
#define OSCAP_COMPAT_H_
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#include "oscap_export.h"
|
|
Packit Service |
569379 |
#include "oscap_platforms.h"
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
/* Fallback functions fixing portability issues */
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#ifndef HAVE_STRSEP
|
|
Packit Service |
569379 |
char *strsep(char **stringp, const char *delim);
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#ifndef HAVE_STRPTIME
|
|
Packit Service |
569379 |
#include <time.h>
|
|
Packit Service |
569379 |
char *strptime(const char *buf, const char *format, struct tm *tm);
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#if defined(unix) || defined(__unix__) || defined(__unix)
|
|
Packit Service |
569379 |
#define OSCAP_UNIX
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#ifdef OS_WINDOWS
|
|
Packit Service |
569379 |
#define PATH_MAX _MAX_PATH
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#ifdef _MSC_VER
|
|
Packit Service |
569379 |
#include <BaseTsd.h>
|
|
Packit Service |
569379 |
typedef SSIZE_T ssize_t;
|
|
Packit Service |
569379 |
#define __PRETTY_FUNCTION__ __FUNCTION__
|
|
Packit Service |
569379 |
#define __attribute__(x)
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
/* Definitions for access() */
|
|
Packit Service |
569379 |
#define F_OK 0
|
|
Packit Service |
569379 |
#define W_OK 2
|
|
Packit Service |
569379 |
#define R_OK 4
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#if !defined(HAVE_DEV_TO_TTY) && !defined(OS_WINDOWS)
|
|
Packit Service |
569379 |
#include <sys/types.h>
|
|
Packit Service |
569379 |
#define ABBREV_DEV 1 /* remove /dev/ */
|
|
Packit Service |
569379 |
#define ABBREV_TTY 2 /* remove tty */
|
|
Packit Service |
569379 |
#define ABBREV_PTS 4 /* remove pts/ */
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
extern unsigned dev_to_tty(char *__restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags);
|
|
Packit Service |
569379 |
#endif
|
|
Packit Service |
569379 |
|
|
Packit Service |
569379 |
#endif
|