diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-31 20:35:15 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-03-31 20:35:15 +0200 |
commit | d27edc7587dba7b850759d151d90cdad1cb34a35 (patch) | |
tree | a8c56137d4509340df975f9bc29238f3c5cdec9a /tests/rscript.c | |
parent | 3b9fd5330a6599c00e9c3c0a4080a141f173aa6a (diff) | |
download | rsyslog-d27edc7587dba7b850759d151d90cdad1cb34a35.tar.gz rsyslog-d27edc7587dba7b850759d151d90cdad1cb34a35.tar.xz rsyslog-d27edc7587dba7b850759d151d90cdad1cb34a35.zip |
porting parser tests to solaris
Diffstat (limited to 'tests/rscript.c')
-rw-r--r-- | tests/rscript.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/rscript.c b/tests/rscript.c index 4906f91a..6b232f5f 100644 --- a/tests/rscript.c +++ b/tests/rscript.c @@ -40,37 +40,6 @@ DEFobjCurrIf(ctok_token) DEFobjCurrIf(vmprg) -/* we emulate getline (the dirty way) if we do not have it - * We do not try very hard, as this is just a test driver. - * rgerhards, 2009-03-31 - */ -#ifndef HAVE_GETLINE -ssize_t getline(char **lineptr, size_t *n, FILE *fp) -{ - int c; - int len = 0; - - if(*lineptr == NULL) - *lineptr = malloc(1024); /* quick and dirty! */ - - c = fgetc(fp); - while(c != EOF && c != '\n') { - (*lineptr)[len++] = c; - c = fgetc(fp); - } - if(c != EOF) /* need to add NL? */ - (*lineptr)[len++] = c; - - (*lineptr)[len] = '\0'; - - *n = len; - //printf("getline returns: '%s'\n", *lineptr); - - return (len > 0) ? len : -1; -} -#endif /* #ifndef HAVE_GETLINE */ - - BEGINInit CODESTARTInit pErrObj = "expr"; CHKiRet(objUse(expr, CORE_COMPONENT)); |