summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/ScannerConfig.h
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-08 00:40:43 +0200
committerJose <jose@zeroc.com>2012-08-08 00:40:43 +0200
commitace53d6f71c1292f2106a1dae0efe13a5c12f0d4 (patch)
treeea235087a9be8a43e58d1803417e41ce3aa870dd /cpp/include/IceUtil/ScannerConfig.h
parentMerge branch 'master' into encoding11 (diff)
downloadice-ace53d6f71c1292f2106a1dae0efe13a5c12f0d4.tar.bz2
ice-ace53d6f71c1292f2106a1dae0efe13a5c12f0d4.tar.xz
ice-ace53d6f71c1292f2106a1dae0efe13a5c12f0d4.zip
fixes for Scanner.l & VC comilers
Diffstat (limited to 'cpp/include/IceUtil/ScannerConfig.h')
-rw-r--r--cpp/include/IceUtil/ScannerConfig.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/cpp/include/IceUtil/ScannerConfig.h b/cpp/include/IceUtil/ScannerConfig.h
new file mode 100644
index 00000000000..30cc6b41cdf
--- /dev/null
+++ b/cpp/include/IceUtil/ScannerConfig.h
@@ -0,0 +1,34 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#pragma once
+
+//
+// COMPILERFIX: With VC++ flex generated files doesn't compile because
+// yywrap is called without args.
+//
+// The macro could have a different name if flex use "%option prefix".
+//
+#ifdef _MSC_VER
+# ifdef slice_wrap
+# undef slice_wrap
+# define slice_wrap() 1
+# endif
+# ifdef freeze_script_wrap
+# undef freeze_script_wrap
+# define freeze_script_wrap() 1
+# endif
+# undef yywrap
+# define yywrap() 1
+ //
+ // We define YY_NO_UNISTD_H so unistd.h doesn't
+ // get included
+ //
+# define YY_NO_UNISTD_H
+#endif