Skip to content

Commit 463c978

Browse files
authored
Correctly import integer types in downstream libraries (#14)
Needed to fix Windows build
1 parent 4a1719a commit 463c978

8 files changed

+21
-12
lines changed

include/flc.i

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@
5353
* Data types and instantiation
5454
* ------------------------------------------------------------------------- */
5555

56-
%{
57-
#include <cstdint>
58-
using std::int32_t;
59-
using std::int64_t;
60-
using std::size_t;
61-
%}
56+
// Note: stdint.i inserts #include <stdint.h>
6257
%include <stdint.i>
6358

6459
%define %flc_template_numeric(SRC, DST)

include/import_flc.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
// Set up macros, etc.
1515
%import "flc.i"
1616

17+
// Set up integer types
18+
%{
19+
#include <stdint.h>
20+
%}
21+
1722
// Support external exceptions
1823
%include <extern_exception.i>

src/flcFORTRAN_wrap.cxx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,6 @@ SWIGEXPORT void SWIG_store_exception(const char *decl,
323323
#include <stdexcept>
324324

325325

326-
#include <cstdint>
327-
using std::int32_t;
328-
using std::int64_t;
329-
using std::size_t;
330-
331-
332326
#include <stdint.h>
333327

334328

src/flc_algorithmFORTRAN_wrap.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ enum AssignmentType {
253253
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
254254

255255

256+
#include <stdint.h>
257+
258+
256259
#include <algorithm>
257260
#include <functional>
258261
#include <numeric>

src/flc_randomFORTRAN_wrap.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ enum AssignmentType {
253253
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
254254

255255

256+
#include <stdint.h>
257+
258+
256259
#include <random>
257260

258261

src/flc_setFORTRAN_wrap.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ enum AssignmentType {
254254
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
255255

256256

257+
#include <stdint.h>
258+
259+
257260
#include <set>
258261

259262

src/flc_stringFORTRAN_wrap.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,9 @@ enum AssignmentType {
259259
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
260260

261261

262+
#include <stdint.h>
263+
264+
262265
#include <string>
263266

264267

src/flc_vectorFORTRAN_wrap.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ enum AssignmentType {
263263
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
264264

265265

266+
#include <stdint.h>
267+
268+
266269
#include <vector>
267270

268271

0 commit comments

Comments
 (0)