Skip to content

Commit

Permalink
compiles with gcc 4.3 (cf. http://gcc.gnu.org/gcc-4.3/changes.html and
Browse files Browse the repository at this point in the history
  • Loading branch information
pead01 committed Jan 2, 2009
1 parent 3917473 commit 9a7e82f
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cheap/chart.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

#include "item.h"
#include "hashing.h"

#include <string>
#include <list>
#include <memory>
#include <queue>

/** Chart data structure for parsing, aka dynamic programming */
Expand Down
1 change: 1 addition & 0 deletions cheap/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "configs.h"
#include "logging.h"

#include <cstring>
#include <iostream>

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions cheap/vpm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "vpm.h"

#include <cstring>

extern FILE* ferr;

tVPM::~tVPM() {
Expand Down
1 change: 1 addition & 0 deletions common/bitcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define _BITCODE_H_

#include <cassert>
#include <cstdio>
#include <iosfwd>

/** \c CODEWORD should be an unsigned numeric type that fits best into a CPU
Expand Down
3 changes: 3 additions & 0 deletions common/dag-common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@

/* operations on dags that are shared between different unifiers */

#include "dag-common.h"
#include "grammar-dump.h"
#include "dag.h"
#include "types.h"

#include <cstring>

/* global variables */

dag_node *FAIL = (dag_node *) -1;
Expand Down
2 changes: 2 additions & 0 deletions common/dumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "byteorder.h"
#include "dumper.h"

#include <cstring>

#define DUMP_LITTLE_ENDIAN true

#define BUFF_SIZE (128 * 1024)
Expand Down
11 changes: 10 additions & 1 deletion common/hashing.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@
#include "pet-config.h"
#include "hash.h"

// TODO switch to <tr1/unordered_map> and <tr1/unordered_set>
// cf. http://gcc.gnu.org/gcc-4.3/changes.html
#ifdef HAVE_HASH_MAP
#define HASH_SPACE std
#include <hash_map>
#include <hash_set>

// gcc 4.3 declared ext/hash_map and ext/hash_set as obsolete, moving the
// header files to the default include path backwards
#if ((__GNUC__ == 4) && ( __GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
#define HASH_SPACE __gnu_cxx
#else
#define HASH_SPACE std
#endif
#endif

#ifdef HAVE_EXT_HASH_MAP
Expand Down
1 change: 1 addition & 0 deletions common/lex-io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "logging.h"

#include <cassert>
#include <cstring>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
Expand Down
2 changes: 2 additions & 0 deletions common/lex-tdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#endif

#include <cassert>
#include <cstdlib>
#include <cstring>
#include <iomanip>

const char *keywords[N_KEYWORDS] = { "declare", "domain", "instance", "lisp",
Expand Down
2 changes: 2 additions & 0 deletions common/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "utility.h"
#include "errors.h"

#include <cstdlib>

//#include <iostream> // only for debugging
#include <sys/stat.h>

Expand Down
1 change: 1 addition & 0 deletions common/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef _UTILITY_H_
#define _UTILITY_H_

#include <cstring>
#include <list>
#include <string>

Expand Down
4 changes: 4 additions & 0 deletions flop/print-tdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@

/* printing of internal representation in TDL syntax */

#include "pet-config.h"
#include "flop.h"
#include "lex-io.h"
#include "list-int.h"
#include "logging.h"
#include "errors.h"

#include <cstdio>
#include <cstring>

int tdl_save_lines = 1;

/* the print_* functions return if what they printed out was complex enough to require a line
Expand Down

0 comments on commit 9a7e82f

Please sign in to comment.