]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #341 in SNORT/snort3 from crc/formats to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 14 Mar 2016 21:11:47 +0000 (17:11 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 14 Mar 2016 21:11:47 +0000 (17:11 -0400)
Squashed commit of the following:

commit 8730ba9a75c90a4a89342cdf211aaa18b1408ba8
Author: snorty <snorty@localhost.localdomain>
Date:   Mon Mar 14 17:02:21 2016 -0400

    add standard c formats

src/connectors/file_connector/file_connector.cc
src/main/snort_types.h

index c6df2a2476ce29e42b6f3cced327ea3b9679792c..500e2a8fbfeea16b0386c4319a6b6d979501387a 100644 (file)
 
 #include "file_connector.h"
 
-#include <glob.h>
 #include <assert.h>
-#include <vector>
-#include <string>
-#include <fstream>
+#include <glob.h>
 #include <stdio.h>
 #include <sys/types.h>
 
+#include <fstream>
+#include <string>
+#include <vector>
+
 #include "file_connector_module.h"
 #include "main/snort_types.h"
 #include "main/snort_debug.h"
index 190df792d6da0df8530394866f9da4983d21b080..f1aeee6b3f7d6df1a65617c46d7ecdac6623b6bd 100644 (file)
 
 // defines common types if not already defined
 
-#include <stdint.h>
+#define __STDC_FORMAT_MACROS
 #include <inttypes.h>
+
+#include <stdint.h>
 #include <sys/types.h>
 
 #ifdef HAVE_CONFIG_H
 
 typedef uint16_t Port;
 
-/* if PRIu64 isn't in <inttypes.h>
- * we define it and similar here */
-#ifndef PRIu64
-#  if SIZEOF_UNSIGNED_LONG_INT == 8
-#    define _SF_PREFIX "l"
-#  else
-#    define _SF_PREFIX "ll"
-#  endif  /* SIZEOF_UNSIGNED_LONG_INT == 8 */
-#  define PRIu64 _SF_PREFIX "u"
-#  define PRIi64 _SF_PREFIX "i"
-#  define PRIx64 _SF_PREFIX "x"
-#endif  /* PRIu64 */
-
 /* use these macros (and those in <inttypes.h>)
  * for 64 bit format portability
  */