Fix some -Wmissing-declarations warnings
[libfirm] / ir / libcore / lc_config_lexer.l
index 9acedd9..d0ed399 100644 (file)
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <stdio.h>
+/* flex generated code wants a declaration of isatty... */
+#ifdef _WIN32
+#include <io.h>
+#else
+#include <unistd.h>
 
 #include "lc_parser_t.h"
 #include "lc_config_parser.h"
 
-static int _lc_opt_wrap(void)
-{
-       return 1;
+#define YY_NO_UNISTD_H
+#define YY_NO_INPUT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+static int _lc_opt_wrap(void);
+#ifdef __cplusplus
 }
+#endif
 
 %}
 
@@ -103,3 +116,10 @@ nl              \n
 .                   return yytext[0];
 
 %%
+
+static int _lc_opt_wrap(void)
+{
+       /* avoid warning */
+       (void) yyunput;
+       return 1;
+}