]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Remove local armsrc/stdint.h and fix some other #includes 225/head
authorpwpiwi <pwpiwi@users.noreply.github.com>
Mon, 6 Mar 2017 18:22:35 +0000 (19:22 +0100)
committerpwpiwi <pwpiwi@users.noreply.github.com>
Mon, 6 Mar 2017 18:22:35 +0000 (19:22 +0100)
13 files changed:
armsrc/BigBuf.c
armsrc/Makefile
armsrc/appmain.c
armsrc/apps.h
armsrc/des.c
armsrc/epa.c
armsrc/optimized_cipher.c
armsrc/pcf7931.c
armsrc/printf.c
armsrc/stdint.h [deleted file]
armsrc/string.h
include/hitag2.h
include/hitagS.h

index 851cf390e795faf4c6d3b3f58411e6d9966a2d5b..a5fcea7d288515227fa6af5ca015efef69578459 100644 (file)
@@ -13,6 +13,7 @@
 #include "proxmark3.h"
 #include "apps.h"
 #include "string.h"
 #include "proxmark3.h"
 #include "apps.h"
 #include "string.h"
+#include "util.h"
 
 // BigBuf is the large multi-purpose buffer, typically used to hold A/D samples or traces.
 // Also used to hold various smaller buffers and the Mifare Emulator Memory.
 
 // BigBuf is the large multi-purpose buffer, typically used to hold A/D samples or traces.
 // Also used to hold various smaller buffers and the Mifare Emulator Memory.
index 04ae7a139c3c2660e28cbc6b7d98d33d2ed53456..2fbad384e48bb18fdf990ddf804862d9472bfefb 100644 (file)
@@ -33,9 +33,6 @@ APP_CFLAGS += $(ZLIB_CFLAGS)
 # zlib includes:
 APP_CFLAGS += -I../zlib
 
 # zlib includes:
 APP_CFLAGS += -I../zlib
 
-# stdint.h provided locally until GCC 4.5 becomes C99 compliant
-APP_CFLAGS += -I.
-
 # Compile these in thumb mode (small size)
 THUMBSRC = start.c \
        $(SRC_LCD) \
 # Compile these in thumb mode (small size)
 THUMBSRC = start.c \
        $(SRC_LCD) \
index 0385517242cb6b215518328a270e7fd07cc9dc72..f4c51e3d5ef297c57cfbb7d27385b2019589df79 100644 (file)
 // executes.
 //-----------------------------------------------------------------------------
 
 // executes.
 //-----------------------------------------------------------------------------
 
+#include <stdarg.h>
+
 #include "usb_cdc.h"
 #include "cmd.h"
 #include "usb_cdc.h"
 #include "cmd.h"
-
 #include "proxmark3.h"
 #include "apps.h"
 #include "util.h"
 #include "printf.h"
 #include "string.h"
 #include "proxmark3.h"
 #include "apps.h"
 #include "util.h"
 #include "printf.h"
 #include "string.h"
-
-#include <stdarg.h>
-
 #include "legicrf.h"
 #include "legicrf.h"
-#include <hitag2.h>
-#include <hitagS.h>
+#include "hitag2.h"
+#include "hitagS.h"
 #include "lfsampling.h"
 #include "BigBuf.h"
 #include "mifareutil.h"
 #include "lfsampling.h"
 #include "BigBuf.h"
 #include "mifareutil.h"
index 8d51335b2d5dada50363d70c403657a58a9086fb..ee63816951ff469a4d9dc47338b52dc1b3487da6 100644 (file)
@@ -15,6 +15,7 @@
 #include <stdint.h>
 #include <stddef.h>
 #include "common.h"
 #include <stdint.h>
 #include <stddef.h>
 #include "common.h"
+#include "usb_cmd.h"
 #include "hitag2.h"
 #include "hitagS.h"
 #include "mifare.h"
 #include "hitag2.h"
 #include "hitagS.h"
 #include "mifare.h"
index f1aa80da20a0f4d8eedc7c4b0d84a9d6d882d555..9bfd10905f11a28706ce5746910719596a97fe08 100644 (file)
@@ -26,7 +26,7 @@
  * 
  */
 #include <stdint.h>
  * 
  */
 #include <stdint.h>
-#include <string.h>
+#include "string.h"
 
 const uint8_t sbox[256]  = {
   /* S-box 1 */
 
 const uint8_t sbox[256]  = {
   /* S-box 1 */
index 50c7d87804dbcd2fc9bc846387ef46ec613bdf05..5e69ffa89d5020132271bd02740c4ef030b39869 100644 (file)
 // functions, You need to do the setup before calling them!
 //-----------------------------------------------------------------------------
 
 // functions, You need to do the setup before calling them!
 //-----------------------------------------------------------------------------
 
+#include "apps.h"
 #include "iso14443a.h"
 #include "iso14443b.h"
 #include "epa.h"
 #include "cmd.h"
 #include "iso14443a.h"
 #include "iso14443b.h"
 #include "epa.h"
 #include "cmd.h"
+#include "fpgaloader.h"
+#include "string.h"
+#include "util.h"
 
 // Protocol and Parameter Selection Request for ISO 14443 type A cards
 // use regular (1x) speed in both directions
 
 // Protocol and Parameter Selection Request for ISO 14443 type A cards
 // use regular (1x) speed in both directions
index bfaf5088fa4ae7cba28e2cc58a489c81b16c3180..005f473b5c45e18e0759bb41fcb955c48476601b 100644 (file)
@@ -61,8 +61,7 @@
 **/
 
 #include "optimized_cipher.h"
 **/
 
 #include "optimized_cipher.h"
-#include <stdlib.h>
-#include <string.h>
+#include <stddef.h>
 #include <stdbool.h>
 #include <stdint.h>
 
 #include <stdbool.h>
 #include <stdint.h>
 
index f9f33c5319fc8a01ad5c6da88f38817c9e2e8ade..e4ba1da5e9a709d7660a33bc0c1da64b47c28736 100644 (file)
@@ -2,6 +2,7 @@
 #include "apps.h"
 #include "lfsampling.h"
 #include "pcf7931.h"
 #include "apps.h"
 #include "lfsampling.h"
 #include "pcf7931.h"
+#include "util.h"
 #include "string.h"
 
 #define T0_PCF 8 //period for the pcf7931 in us
 #include "string.h"
 
 #define T0_PCF 8 //period for the pcf7931 in us
index d5e61798a3516f82ee932922f8b63e1a81139ef2..94ed809d2a5aaf8f6a8e7e311c1cf8a6cc00f91e 100644 (file)
@@ -40,9 +40,6 @@
 #include "util.h"
 #include "string.h"
 
 #include "util.h"
 #include "string.h"
 
-typedef uint32_t uintmax_t;
-typedef int32_t intmax_t;
-
 typedef unsigned char u_char;
 typedef unsigned int u_int;
 typedef unsigned long u_long;
 typedef unsigned char u_char;
 typedef unsigned int u_int;
 typedef unsigned long u_long;
diff --git a/armsrc/stdint.h b/armsrc/stdint.h
deleted file mode 100644 (file)
index 78a0b05..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (C) 2010 Hector Martin "marcan" <marcan@marcansoft.com>
-//
-// This code is licensed to you under the terms of the GNU GPL, version 2 or,
-// at your option, any later version. See the LICENSE.txt file for the text of
-// the license.
-//-----------------------------------------------------------------------------
-// Replacement stdint.h because GCC doesn't come with it yet (C99)
-//-----------------------------------------------------------------------------
-
-#ifndef __STDINT_H
-#define __STDINT_H
-
-typedef signed char                            int8_t;
-typedef short int                              int16_t;
-typedef int                                            int32_t;
-typedef long long int                  int64_t;
-
-typedef unsigned char                  uint8_t;
-typedef unsigned short int             uint16_t;
-typedef unsigned int                   uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int                                            intptr_t;
-typedef unsigned int                   uintptr_t;
-
-#endif /* __STDINT_H */
index a9dbd826f0e28167d5527af94c0bfbe548c88f32..07ac112f285a1b73bbeb8921e80d733e705bad86 100644 (file)
@@ -13,7 +13,7 @@
 #define __STRING_H
 
 #include <stdint.h>
 #define __STRING_H
 
 #include <stdint.h>
-#include <util.h>
+#include "util.h"
 
 int strlen(const char *str);
 RAMFUNC void *memcpy(void *dest, const void *src, int len);
 
 int strlen(const char *str);
 RAMFUNC void *memcpy(void *dest, const void *src, int len);
index 00447623043f8524ea989e43227f0e67606e9f0c..66770d98c5ee0610b4f796a323d19d90961a4481 100644 (file)
 #ifndef _HITAG2_H_
 #define _HITAG2_H_
 
 #ifndef _HITAG2_H_
 #define _HITAG2_H_
 
+#ifdef _MSC_VER
+#define PACKED
+#else
+#define PACKED __attribute__((packed))
+#endif
+
 typedef enum {
        RHTSF_CHALLENGE           = 01,
        RHTSF_KEY                 = 02,
 typedef enum {
        RHTSF_CHALLENGE           = 01,
        RHTSF_KEY                 = 02,
index 351ca86cc1871590f5dc795d72d5b7896af50fba..e447714bc7cf87111294d25d6d32f95248052318 100644 (file)
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 
 
-#include <stdlib.h>
-#include <string.h>
-#include <hitag2.h>
-
 #ifndef _HITAGS_H_
 #define _HITAGS_H_
 
 #ifndef _HITAGS_H_
 #define _HITAGS_H_
 
+#include "hitag2.h"
+
 typedef enum PROTO_STATE {READY=0,INIT,AUTHENTICATE,SELECTED,QUIET,TTF,FAIL} PSTATE;                           //protocol-state
 typedef enum TAG_STATE   {NO_OP=0,READING_PAGE,WRITING_PAGE_ACK,WRITING_PAGE_DATA,WRITING_BLOCK_DATA} TSATE;   //tag-state
 typedef enum SOF_TYPE    {STANDARD=0,ADVANCED,FAST_ADVANCED,ONE,NO_BITS} stype;                                        //number of start-of-frame bits
 typedef enum PROTO_STATE {READY=0,INIT,AUTHENTICATE,SELECTED,QUIET,TTF,FAIL} PSTATE;                           //protocol-state
 typedef enum TAG_STATE   {NO_OP=0,READING_PAGE,WRITING_PAGE_ACK,WRITING_PAGE_DATA,WRITING_BLOCK_DATA} TSATE;   //tag-state
 typedef enum SOF_TYPE    {STANDARD=0,ADVANCED,FAST_ADVANCED,ONE,NO_BITS} stype;                                        //number of start-of-frame bits
Impressum, Datenschutz