C99 compiler is a requirement so we don't need --enable-std99 anymore.
Define _XOPEN_SOURCE 600 using config.h
This commit is contained in:
parent
0b720d30cd
commit
e4ca9245ec
4 changed files with 36 additions and 33 deletions
12
configure.ac
12
configure.ac
|
@ -33,6 +33,7 @@ AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
|||
AC_HEADER_STDC
|
||||
AC_HEADER_STDBOOL
|
||||
AC_CHECK_HEADERS([stdio.h stdlib.h stdint.h stddef.h stdbool.h])
|
||||
AC_CHECK_FUNCS(strdup, [AC_DEFINE([_XOPEN_SOURCE], [600], [Enable POSIX extensions if present])])
|
||||
|
||||
# Checks for types
|
||||
AC_TYPE_SIZE_T
|
||||
|
@ -186,20 +187,11 @@ fi
|
|||
|
||||
AC_SUBST(PKG_CONFIG_REQUIRES)
|
||||
|
||||
# Set C standard to C99
|
||||
# C99 standard support (default: yes)
|
||||
AC_ARG_ENABLE([std-c99],AS_HELP_STRING([--disable-std-c99],[Disable C99 standard when compiling]),[enable_std_c99=$enableval],[enable_std_c99="yes"])
|
||||
|
||||
AC_MSG_CHECKING(for C99 support)
|
||||
AC_MSG_RESULT($enable_std_c99)
|
||||
|
||||
if test x"$enable_std_c99" != "xno"
|
||||
then
|
||||
# Defines and C flags
|
||||
CFLAGS="$CFLAGS -std=c99"
|
||||
|
||||
# Workarounds for libusb in c99
|
||||
CFLAGS="$CFLAGS -Du_int8_t=uint8_t -Du_int16_t=uint16_t"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
|
@ -15,15 +15,21 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file drivers.h
|
||||
* @brief
|
||||
* @brief Supported drivers header
|
||||
*/
|
||||
|
||||
#ifndef __NFC_DRIVERS_H__
|
||||
#define __NFC_DRIVERS_H__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
|
||||
#include <nfc/nfc-types.h>
|
||||
|
||||
#ifdef HAVE_PCSC_LITE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
|
@ -15,20 +15,24 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*
|
||||
* @file arygon.c
|
||||
* @brief
|
||||
*/
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
/**
|
||||
* @file arygon.c
|
||||
* @brief ARYGON readers driver
|
||||
*
|
||||
* This driver can handle ARYGON readers that use UART as bus.
|
||||
* UART connection can be direct (host<->arygon_uc) or could be provided by internal USB to serial interface (e.g. host<->ftdi_chip<->arygon_uc)
|
||||
*/
|
||||
#include "../drivers.h"
|
||||
#include "../bitutils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "arygon.h"
|
||||
|
||||
#include <nfc/nfc-messages.h>
|
||||
|
||||
#include "../drivers.h"
|
||||
#include "../bitutils.h"
|
||||
// Bus
|
||||
#include "../buses/uart.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*-
|
||||
* Public platform independent Near Field Communication (NFC) library
|
||||
*
|
||||
* Copyright (C) 2009, Roel Verdult
|
||||
|
@ -15,12 +15,15 @@
|
|||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
*
|
||||
* @file pn532_uart.c
|
||||
* @brief
|
||||
*/
|
||||
#define _XOPEN_SOURCE 600
|
||||
|
||||
/**
|
||||
* @file pn532_uart.c
|
||||
* @brief PN532 driver using UART bus (UART, RS232, etc.)
|
||||
*/
|
||||
#include "../drivers.h"
|
||||
#include "../bitutils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -28,8 +31,6 @@
|
|||
|
||||
#include <nfc/nfc-messages.h>
|
||||
|
||||
#include "../drivers.h"
|
||||
#include "../bitutils.h"
|
||||
|
||||
// Bus
|
||||
#include "uart.h"
|
||||
|
|
Loading…
Reference in a new issue