From 935a8d36da3c61e32e1171bf93e8ae926e0cf0c8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 9 Apr 2011 18:18:59 -0700 Subject: [PATCH 1/2] Triggering build. --- pushbuild.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pushbuild.txt b/pushbuild.txt index 82b8bdb7..2a24ccfe 100644 --- a/pushbuild.txt +++ b/pushbuild.txt @@ -40,3 +40,4 @@ crab jibbly jibbly jibbly oh mercurial hi +oh, hello From 86a1641ac1cdd283e6a4c511d2c12635b38f63aa Mon Sep 17 00:00:00 2001 From: Berni Date: Wed, 13 Apr 2011 04:02:22 -0700 Subject: [PATCH 2/2] Fix compiler hanging when #including a directory (bug 4822, r=dvander) --- sourcepawn/compiler/libpawnc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sourcepawn/compiler/libpawnc.c b/sourcepawn/compiler/libpawnc.c index 3331335b..e0e736a2 100644 --- a/sourcepawn/compiler/libpawnc.c +++ b/sourcepawn/compiler/libpawnc.c @@ -29,6 +29,11 @@ #include "sc.h" #include "memfile.h" +#if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined DARWIN +#include +#include +#endif + /* pc_printf() * Called for general purpose "console" output. This function prints general * purpose messages; errors go through pc_error(). The function is modelled @@ -100,6 +105,17 @@ static char *prefix[3]={ "error", "fatal error", "warning" }; */ void *pc_opensrc(char *filename) { + #if defined LINUX || defined __FreeBSD__ || defined __OpenBSD__ || defined DARWIN + struct stat fileInfo; + if (stat(filename, &fileInfo) != 0) { + return NULL; + } + + if (S_ISDIR(fileInfo.st_mode)) { + return NULL; + } + #endif + return fopen(filename,"rt"); }