Fix a few compilation warning/errors on Linux/Mac.
Review URL: https://codereview.appspot.com/6009045
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1030 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/common/version.h b/src/common/version.h
index cdec875..153c51e 100644
--- a/src/common/version.h
+++ b/src/common/version.h
@@ -1,7 +1,7 @@
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
-#define BUILD_REVISION 1027
+#define BUILD_REVISION 1030
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
diff --git a/src/compiler/glslang_lex.cpp b/src/compiler/glslang_lex.cpp
index 3efe2c5..dde988b 100644
--- a/src/compiler/glslang_lex.cpp
+++ b/src/compiler/glslang_lex.cpp
@@ -2922,7 +2922,7 @@
context->recover();
}
-void CPPErrorToInfoLog(char *msg)
+void CPPErrorToInfoLog(const char *msg)
{
SETUP_CONTEXT(cpp);
context->error(yylineno, msg, "", "");
diff --git a/src/compiler/preprocessor/cpp.h b/src/compiler/preprocessor/cpp.h
index db4c184..e49ca71 100644
--- a/src/compiler/preprocessor/cpp.h
+++ b/src/compiler/preprocessor/cpp.h
@@ -73,7 +73,7 @@
void CPPWarningToInfoLog(const char *msg); // Prints warning messages into info log
void HandlePragma(const char**, int numTokens); // #pragma directive container.
void ResetTString(void); // #error Message as TString.
-void CPPErrorToInfoLog(char*); // Stick all cpp errors into Sh.Info.log .
+void CPPErrorToInfoLog(const char*); // Stick all cpp errors into Sh.Info.log .
void StoreStr(char*); // Store the TString in Parse Context.
void SetLineNumber(int); // Set line number.
void SetStringNumber(int); // Set string number.
diff --git a/src/compiler/preprocessor/lexer_glue.cpp b/src/compiler/preprocessor/lexer_glue.cpp
index 64b259b..74ad9b5 100644
--- a/src/compiler/preprocessor/lexer_glue.cpp
+++ b/src/compiler/preprocessor/lexer_glue.cpp
@@ -4,6 +4,9 @@
// found in the LICENSE file.
//
+#include <stdlib.h>
+#include <string.h>
+
extern "C" {
#include "compiler/preprocessor/lexer_glue.h"
#include "compiler/preprocessor/slglobals.h"
diff --git a/src/compiler/preprocessor/memory.h b/src/compiler/preprocessor/memory.h
index b3ae2f9..5fcadb3 100644
--- a/src/compiler/preprocessor/memory.h
+++ b/src/compiler/preprocessor/memory.h
@@ -45,6 +45,8 @@
#ifndef __MEMORY_H
#define __MEMORY_H
+#include <stddef.h>
+
typedef struct MemoryPool_rec MemoryPool;
extern MemoryPool *mem_CreatePool(size_t chunksize, unsigned int align);
diff --git a/src/compiler/preprocessor/scanner.h b/src/compiler/preprocessor/scanner.h
index 12aceab..b67c1d6 100644
--- a/src/compiler/preprocessor/scanner.h
+++ b/src/compiler/preprocessor/scanner.h
@@ -71,7 +71,7 @@
int InitScanner(CPPStruct *cpp); // Intialise the cpp scanner.
int InitScannerInput(CPPStruct *cpp, int count, const char* const string[], const int length[]);
int check_EOF(int); // check if we hit a EOF abruptly
-void CPPErrorToInfoLog(char *); // sticking the msg,line into the Shader's.Info.log
+void CPPErrorToInfoLog(const char *); // sticking the msg,line into the Shader's.Info.log
void SetLineNumber(int);
void SetStringNumber(int);
void IncLineNumber(void);
diff --git a/src/compiler/preprocessor/symbols.h b/src/compiler/preprocessor/symbols.h
index c19f79c..23203da 100644
--- a/src/compiler/preprocessor/symbols.h
+++ b/src/compiler/preprocessor/symbols.h
@@ -105,7 +105,7 @@
Symbol *AddSymbol(SourceLoc *loc, Scope *fScope, int atom, symbolkind kind);
Symbol *LookUpLocalSymbol(Scope *fScope, int atom);
Symbol *LookUpSymbol(Scope *fScope, int atom);
-void CPPErrorToInfoLog(char *);
+void CPPErrorToInfoLog(const char *);
#endif // !defined(__SYMBOLS_H)