Commit 59d47bc7 authored by Ludovic Rousseau's avatar Ludovic Rousseau

Add MIN/MAX declarations in nfc-internal.h and nfc-utils.h

Remove the now useless #include <sys/param.h>
parent a14ec0cb
......@@ -28,7 +28,6 @@
/* vim: set ts=2 sw=2 et: */
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/time.h>
......
......@@ -35,8 +35,6 @@
#include <string.h>
#include <stdlib.h>
#include <sys/param.h>
#include "nfc/nfc.h"
#include "nfc-internal.h"
#include "pn53x.h"
......
......@@ -31,7 +31,6 @@
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <sys/param.h>
#include <string.h>
#include <unistd.h>
......
......@@ -38,7 +38,6 @@
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <sys/param.h>
#include <string.h>
#include <unistd.h>
......
......@@ -45,6 +45,13 @@
return false; \
}
#ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
/*
* Buffer management macros.
*
......
......@@ -78,8 +78,6 @@
#include "nfc-internal.h"
#include "drivers.h"
#include <sys/param.h>
#define LOG_CATEGORY "libnfc.general"
const struct nfc_driver *nfc_drivers[] = {
......
......@@ -39,7 +39,6 @@
#ifdef HAVE_LIBUSB
# ifdef DEBUG
# include <sys/param.h>
# include <usb.h>
# endif
#endif
......
......@@ -39,7 +39,6 @@
#ifdef HAVE_LIBUSB
# ifdef DEBUG
# include <sys/param.h>
# include <usb.h>
# endif
#endif
......
......@@ -49,7 +49,6 @@
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/param.h>
#include <unistd.h>
#include <nfc/nfc.h>
......
......@@ -79,6 +79,13 @@
# define ERR(...) warnx ("ERROR: " __VA_ARGS__ )
#endif
#ifndef MIN
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
uint8_t oddparity (const uint8_t bt);
void oddparity_bytes_ts (const uint8_t *pbtData, const size_t szLen, uint8_t *pbtPar);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment