Skip to content

Commit

Permalink
stdint.h compatibility stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
animetosho committed Oct 25, 2015
1 parent 7ab9179 commit ca5b84e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
6 changes: 1 addition & 5 deletions gf-complete/gf_complete.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@

#ifndef _GF_COMPLETE_H_
#define _GF_COMPLETE_H_
#if defined(_MSC_VER) && !defined(_STDINT) && _MSC_VER < 1900
#include "msc_stdint.h"
#else
#include <stdint.h>
#endif
#include "../stdint.h"

#include "platform.h"

Expand Down
6 changes: 1 addition & 5 deletions gf-complete/gf_w16.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
#ifndef GF_COMPLETE_GF_W16_H
#define GF_COMPLETE_GF_W16_H

#if defined(_MSC_VER) && _MSC_VER < 1900
#include "msc_stdint.h"
#else
#include <stdint.h>
#endif
#include "../stdint.h"

#define GF_FIELD_WIDTH (16)
#define GF_FIELD_SIZE (1 << GF_FIELD_WIDTH)
Expand Down
2 changes: 1 addition & 1 deletion md5/md5.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <stdint.h>
#include "../stdint.h"

#define MD5_BLOCKSIZE 64

Expand Down
8 changes: 5 additions & 3 deletions gf-complete/msc_stdint.h → stdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
//
///////////////////////////////////////////////////////////////////////////////

#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#if !defined(_MSC_VER) || defined(_STDINT) || _MSC_VER >= 1900
#include <stdint.h>
#else

#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
Expand Down Expand Up @@ -245,3 +245,5 @@ typedef uint64_t uintmax_t;


#endif // _MSC_STDINT_H_ ]

#endif // MSVC stuff

0 comments on commit ca5b84e

Please sign in to comment.