aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-06 22:50:27 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-06 22:50:27 +0000
commitc3159f00c06944d6a97d735cae0265aabdc9ea10 (patch)
treea80c777a0647a439d314ba5f4094e75cf71b801c
parentcf382200105f9d651b1d280c28faf165fd63e634 (diff)
Merged revisions 155121 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r155121 | kpfleming | 2008-11-06 16:49:19 -0600 (Thu, 06 Nov 2008) | 3 lines don't blindly assume that Darwin and Cygwin need GLOB_ABORTED defined; only define it if it is not already defined ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@155123 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--res/ael/ael.flex5
-rw-r--r--res/ael/ael_lex.c167
-rw-r--r--utils/extconf.c5
3 files changed, 91 insertions, 86 deletions
diff --git a/res/ael/ael.flex b/res/ael/ael.flex
index b2d64b5ca..1c864322f 100644
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
@@ -66,11 +66,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <glob.h>
-#if defined(__Darwin__) || defined(__CYGWIN__)
+#if !defined(GLOB_ABORTED)
#define GLOB_ABORTED GLOB_ABEND
#endif
-# include <glob.h>
+
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
diff --git a/res/ael/ael_lex.c b/res/ael/ael_lex.c
index b774450d5..20107ccc0 100644
--- a/res/ael/ael_lex.c
+++ b/res/ael/ael_lex.c
@@ -818,11 +818,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <glob.h>
-#if defined(__Darwin__) || defined(__CYGWIN__)
+#if !defined(GLOB_ABORTED)
#define GLOB_ABORTED GLOB_ABEND
#endif
-# include <glob.h>
+
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
@@ -945,7 +946,7 @@ static void pbcwhere(const char *text, int *line, int *col )
#define STORE_POS
#define STORE_LOC
#endif
-#line 948 "ael_lex.c"
+#line 949 "ael_lex.c"
#define INITIAL 0
#define paren 1
@@ -1193,10 +1194,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 208 "ael.flex"
+#line 209 "ael.flex"
-#line 1199 "ael_lex.c"
+#line 1200 "ael_lex.c"
yylval = yylval_param;
@@ -1287,260 +1288,260 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 210 "ael.flex"
+#line 211 "ael.flex"
{ STORE_POS; return LC;}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 211 "ael.flex"
+#line 212 "ael.flex"
{ STORE_POS; return RC;}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 212 "ael.flex"
+#line 213 "ael.flex"
{ STORE_POS; return LP;}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 213 "ael.flex"
+#line 214 "ael.flex"
{ STORE_POS; return RP;}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 214 "ael.flex"
+#line 215 "ael.flex"
{ STORE_POS; return SEMI;}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 215 "ael.flex"
+#line 216 "ael.flex"
{ STORE_POS; return EQ;}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 216 "ael.flex"
+#line 217 "ael.flex"
{ STORE_POS; return COMMA;}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 217 "ael.flex"
+#line 218 "ael.flex"
{ STORE_POS; return COLON;}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 218 "ael.flex"
+#line 219 "ael.flex"
{ STORE_POS; return AMPER;}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 219 "ael.flex"
+#line 220 "ael.flex"
{ STORE_POS; return BAR;}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 220 "ael.flex"
+#line 221 "ael.flex"
{ STORE_POS; return EXTENMARK;}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 221 "ael.flex"
+#line 222 "ael.flex"
{ STORE_POS; return AT;}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 222 "ael.flex"
+#line 223 "ael.flex"
{/*comment*/}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 223 "ael.flex"
+#line 224 "ael.flex"
{ STORE_POS; return KW_CONTEXT;}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 224 "ael.flex"
+#line 225 "ael.flex"
{ STORE_POS; return KW_ABSTRACT;}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 225 "ael.flex"
+#line 226 "ael.flex"
{ STORE_POS; return KW_EXTEND;}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 226 "ael.flex"
+#line 227 "ael.flex"
{ STORE_POS; return KW_MACRO;};
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 227 "ael.flex"
+#line 228 "ael.flex"
{ STORE_POS; return KW_GLOBALS;}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 228 "ael.flex"
+#line 229 "ael.flex"
{ STORE_POS; return KW_LOCAL;}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 229 "ael.flex"
+#line 230 "ael.flex"
{ STORE_POS; return KW_IGNOREPAT;}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 230 "ael.flex"
+#line 231 "ael.flex"
{ STORE_POS; return KW_SWITCH;}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 231 "ael.flex"
+#line 232 "ael.flex"
{ STORE_POS; return KW_IF;}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 232 "ael.flex"
+#line 233 "ael.flex"
{ STORE_POS; return KW_IFTIME;}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 233 "ael.flex"
+#line 234 "ael.flex"
{ STORE_POS; return KW_RANDOM;}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 234 "ael.flex"
+#line 235 "ael.flex"
{ STORE_POS; return KW_REGEXTEN;}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 235 "ael.flex"
+#line 236 "ael.flex"
{ STORE_POS; return KW_HINT;}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 236 "ael.flex"
+#line 237 "ael.flex"
{ STORE_POS; return KW_ELSE;}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 237 "ael.flex"
+#line 238 "ael.flex"
{ STORE_POS; return KW_GOTO;}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 238 "ael.flex"
+#line 239 "ael.flex"
{ STORE_POS; return KW_JUMP;}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 239 "ael.flex"
+#line 240 "ael.flex"
{ STORE_POS; return KW_RETURN;}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 240 "ael.flex"
+#line 241 "ael.flex"
{ STORE_POS; return KW_BREAK;}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 241 "ael.flex"
+#line 242 "ael.flex"
{ STORE_POS; return KW_CONTINUE;}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 242 "ael.flex"
+#line 243 "ael.flex"
{ STORE_POS; return KW_FOR;}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 243 "ael.flex"
+#line 244 "ael.flex"
{ STORE_POS; return KW_WHILE;}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 244 "ael.flex"
+#line 245 "ael.flex"
{ STORE_POS; return KW_CASE;}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 245 "ael.flex"
+#line 246 "ael.flex"
{ STORE_POS; return KW_DEFAULT;}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 246 "ael.flex"
+#line 247 "ael.flex"
{ STORE_POS; return KW_PATTERN;}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 247 "ael.flex"
+#line 248 "ael.flex"
{ STORE_POS; return KW_CATCH;}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 248 "ael.flex"
+#line 249 "ael.flex"
{ STORE_POS; return KW_SWITCHES;}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 249 "ael.flex"
+#line 250 "ael.flex"
{ STORE_POS; return KW_ESWITCHES;}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 250 "ael.flex"
+#line 251 "ael.flex"
{ STORE_POS; return KW_INCLUDES;}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 251 "ael.flex"
+#line 252 "ael.flex"
{ BEGIN(comment); my_col += 2; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 253 "ael.flex"
+#line 254 "ael.flex"
{ my_col += yyleng; }
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
-#line 254 "ael.flex"
+#line 255 "ael.flex"
{ ++my_lineno; my_col=1;}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 255 "ael.flex"
+#line 256 "ael.flex"
{ my_col += yyleng; }
YY_BREAK
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
-#line 256 "ael.flex"
+#line 257 "ael.flex"
{ ++my_lineno; my_col=1;}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 257 "ael.flex"
+#line 258 "ael.flex"
{ my_col += 2; BEGIN(INITIAL); } /* the nice thing about comments is that you know exactly what ends them */
YY_BREAK
case 48:
/* rule 48 can match eol */
YY_RULE_SETUP
-#line 259 "ael.flex"
+#line 260 "ael.flex"
{ my_lineno++; my_col = 1; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 260 "ael.flex"
+#line 261 "ael.flex"
{ my_col += yyleng; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 261 "ael.flex"
+#line 262 "ael.flex"
{ my_col += (yyleng*8)-(my_col%8); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 263 "ael.flex"
+#line 264 "ael.flex"
{
/* boy did I open a can of worms when I changed the lexical token "word".
all the above keywords can be used as a beginning to a "word".-
@@ -1569,22 +1570,22 @@ YY_RULE_SETUP
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 289 "ael.flex"
+#line 290 "ael.flex"
{ yymore(); /* Keep going */ }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 290 "ael.flex"
+#line 291 "ael.flex"
{ yymore(); /* Keep going */ }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 291 "ael.flex"
+#line 292 "ael.flex"
{ yymore(); /* Keep Going */ }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 292 "ael.flex"
+#line 293 "ael.flex"
{ /* the beginning of a ${} construct. prepare and pop into curlystate */
parencount2 = 0;
pbcpos2 = 0;
@@ -1595,7 +1596,7 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 299 "ael.flex"
+#line 300 "ael.flex"
{ /* the beginning of a $[] construct. prepare and pop into brackstate */
parencount3 = 0;
pbcpos3 = 0;
@@ -1607,7 +1608,7 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 306 "ael.flex"
+#line 307 "ael.flex"
{
/* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext[yyleng-1];
@@ -1622,7 +1623,7 @@ YY_RULE_SETUP
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
-#line 318 "ael.flex"
+#line 319 "ael.flex"
{
if ( pbcpop2('}') ) { /* error */
STORE_LOC;
@@ -1643,7 +1644,7 @@ YY_RULE_SETUP
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
-#line 335 "ael.flex"
+#line 336 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '{')
@@ -1655,7 +1656,7 @@ YY_RULE_SETUP
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
-#line 343 "ael.flex"
+#line 344 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop2(c)) { /* error */
@@ -1672,7 +1673,7 @@ YY_RULE_SETUP
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
-#line 357 "ael.flex"
+#line 358 "ael.flex"
{
if ( pbcpop3(']') ) { /* error */
STORE_LOC;
@@ -1693,7 +1694,7 @@ YY_RULE_SETUP
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
-#line 374 "ael.flex"
+#line 375 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '[')
@@ -1705,7 +1706,7 @@ YY_RULE_SETUP
case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
-#line 382 "ael.flex"
+#line 383 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop3(c)) { /* error */
@@ -1729,7 +1730,7 @@ YY_RULE_SETUP
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 403 "ael.flex"
+#line 404 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
@@ -1755,7 +1756,7 @@ YY_RULE_SETUP
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 425 "ael.flex"
+#line 426 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
@@ -1767,7 +1768,7 @@ YY_RULE_SETUP
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 433 "ael.flex"
+#line 434 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c)) { /* error */
@@ -1792,7 +1793,7 @@ YY_RULE_SETUP
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
-#line 455 "ael.flex"
+#line 456 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
@@ -1804,7 +1805,7 @@ YY_RULE_SETUP
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
-#line 463 "ael.flex"
+#line 464 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
@@ -1832,7 +1833,7 @@ YY_RULE_SETUP
case 69:
/* rule 69 can match eol */
YY_RULE_SETUP
-#line 487 "ael.flex"
+#line 488 "ael.flex"
{
if( parencount != 0) { /* printf("Folding in a comma!\n"); */
yymore();
@@ -1850,7 +1851,7 @@ YY_RULE_SETUP
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
-#line 501 "ael.flex"
+#line 502 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
@@ -1871,7 +1872,7 @@ YY_RULE_SETUP
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
-#line 518 "ael.flex"
+#line 519 "ael.flex"
{
char c = yytext[yyleng-1];
yymore();
@@ -1881,7 +1882,7 @@ YY_RULE_SETUP
case 72:
/* rule 72 can match eol */
YY_RULE_SETUP
-#line 524 "ael.flex"
+#line 525 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
@@ -1897,7 +1898,7 @@ YY_RULE_SETUP
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
-#line 536 "ael.flex"
+#line 537 "ael.flex"
{
STORE_LOC;
yylval->str = strdup(yytext);
@@ -1910,7 +1911,7 @@ YY_RULE_SETUP
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
-#line 545 "ael.flex"
+#line 546 "ael.flex"
{
char fnamebuf[1024],*p1,*p2;
int glob_ret;
@@ -1963,7 +1964,7 @@ case YY_STATE_EOF(comment):
case YY_STATE_EOF(curlystate):
case YY_STATE_EOF(wordstate):
case YY_STATE_EOF(brackstate):
-#line 590 "ael.flex"
+#line 591 "ael.flex"
{
char fnamebuf[2048];
if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
@@ -1998,10 +1999,10 @@ case YY_STATE_EOF(brackstate):
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 622 "ael.flex"
+#line 623 "ael.flex"
ECHO;
YY_BREAK
-#line 2004 "ael_lex.c"
+#line 2005 "ael_lex.c"
case YY_END_OF_BUFFER:
{
@@ -3174,7 +3175,7 @@ void *ael_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 622 "ael.flex"
+#line 623 "ael.flex"
diff --git a/utils/extconf.c b/utils/extconf.c
index 6db4f6d8b..5003a5c6a 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -49,11 +49,14 @@
#include <pthread.h>
#include <netdb.h>
#include <sys/param.h>
+
#define ASINCLUDE_GLOB 1
#ifdef AST_INCLUDE_GLOB
-#if defined(__Darwin__) || defined(__CYGWIN__)
+
+#if !defined(GLOB_ABORTED)
#define GLOB_ABORTED GLOB_ABEND
#endif
+
# include <glob.h>
#endif