*.la
*.lcd
*.lo
+tax
tdigest
tdir
tficl
+bounds
-bufferoverflowhigh
-
# --- +partial artifacts
-declundef
-exportheadervar
LINT = splint
-EXTRA_DIST = tdigest.c tdir.c tficl.c tfts.c tglob.c tinv.c tkey.c trpmio.c
+EXTRA_DIST = tax.c tdigest.c tdir.c tficl.c tfts.c tglob.c tinv.c tkey.c trpmio.c
-EXTRA_PROGRAMS = tdigest tdir tfts tglob tinv tkey tring trpmio tsw dumpasn1
+EXTRA_PROGRAMS = tax tdigest tdir tfts tglob tinv tkey tring trpmio tsw dumpasn1
INCLUDES = -I. \
-I$(top_srcdir) \
@WITH_BEECRYPT_INCLUDE@ \
+ @WITH_LUA_INCLUDE@ \
-I$(top_srcdir)/popt \
- -I$(top_srcdir)/lua/include \
- -I$(top_srcdir)/lua/local \
@INCPATH@
pkgincdir = $(pkgincludedir)
pkginc_HEADERS = \
argv.h fts.h \
rpmio.h rpmurl.h rpmmacro.h rpmlog.h rpmmessages.h rpmerr.h rpmpgp.h \
- rpmsq.h rpmsw.h ugid.h rpmlua.h rpmhook.h
-noinst_HEADERS = rpmio_internal.h
+ rpmsq.h rpmsw.h ugid.h
+noinst_HEADERS = rpmio_internal.h rpmlua.h rpmhook.h
BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)
usrlib_LTLIBRARIES = librpmio.la
librpmio_la_SOURCES = \
argv.c digest.c fts.c macro.c \
- rpmio.c rpmlog.c rpmmalloc.c \
- rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c \
- rpmlua.c rpmhook.c
+ rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \
+ rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c
librpmio_la_LDFLAGS = -release 4.3 $(LDFLAGS) \
@WITH_BEECRYPT_LIB@ \
+ @WITH_LUA_LIB@ \
$(top_builddir)/file/src/libfmagic.la \
- $(top_builddir)/lua/liblua.la \
@WITH_ZLIB_LIB@ \
-lrt -lpthread
librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
lint:
$(LINT) $(DEFS) $(INCLUDES) $(librpmio_la_SOURCES)
+tax_SOURCES = tax.c
+tax_LDADD = librpmio.la
+
tdigest_SOURCES = tdigest.c
tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la -lgcrypt
#include <rpmio_internal.h>
#include <rpmmessages.h>
#include <rpmerr.h>
+
+#ifdef WITH_LUA
#include <rpmlua.h>
+#endif
#endif
continue;
}
+#ifdef WITH_LUA
if (STREQ("lua", f, fn)) {
rpmlua lua = NULL; /* Global state. */
const char *ls = s+sizeof("{lua:")-1;
s = se;
continue;
}
+#endif
/* XXX necessary but clunky */
if (STREQ("basename", f, fn) ||
}
/*@=branchstate@*/
#endif
- av = _free(av);
+ av = _free(av);
/*@-branchstate@*/
if (rc || argvPtr == NULL) {
/*@-dependenttrans -unqualifiedtrans@*/
rpmhookArgs rpmhookArgsFree(rpmhookArgs args)
{
- free(args);
+ if (args != NULL)
+ free(args);
return NULL;
}
}
static void rpmhookTableDelItem(rpmhookTable *table, const char *name,
- rpmhookFunc func, void *data,
- int matchfunc, int matchdata)
+ /*@null@*/ rpmhookFunc func, /*@null@*/ void *data,
+ int matchfunc, int matchdata)
/*@modifies *table @*/
{
int n = rpmhookTableFindBucket(table, name);
/*@only@*/
rpmhookArgs rpmhookArgsNew(int argc)
/*@*/;
-rpmhookArgs rpmhookArgsFree(/*@only@*/ rpmhookArgs args)
+/*@null@*/
+rpmhookArgs rpmhookArgsFree(/*@only@*/ /*@null@*/ rpmhookArgs args)
/*@modifies args @*/;
void rpmhookRegister(const char *name, rpmhookFunc func, void *data)
tvp->tv_usec = 0;
}
FD_SET(fdno, &wrfds);
- /*@-compdef -nullpass@*/
+/*@-compdef -nullpass@*/
rc = select(fdno + 1, NULL, &wrfds, NULL, tvp);
- /*@=compdef =nullpass@*/
+/*@=compdef =nullpass@*/
#endif
if (_rpmio_debug && !(rc == 1 && errno == 0))
/* =============================================================== */
static ssize_t gzdRead(void * cookie, /*@out@*/ char * buf, size_t count)
/*@globals fileSystem, internalState @*/
- /*@modifies *buf, fileSystem, internalState @*/
+ /*@modifies buf, fileSystem, internalState @*/
{
FD_t fd = c2f(cookie);
gzFile gzfile;
/*@-bounds -realcompare -sizeoftype -protoparammatch @*/
#include "system.h"
+
+#ifdef WITH_LUA
#include <rpmio.h>
#include <rpmmacro.h>
#include <rpmerr.h>
#include <rpmurl.h>
#include <rpmhook.h>
-#include "../lua/include/lua.h"
-#include "../lua/include/lualib.h"
-#include "../lua/include/lauxlib.h"
-#include "../lua/local/lposix.h"
-#include "../lua/local/lrexlib.h"
+#include <lua.h>
+#include <lualib.h>
+#include <lauxlib.h>
+#include <lposix.h>
+#include <lrexlib.h>
#include <unistd.h>
#include <assert.h>
luaL_openlib(L, "rpm", rpmlib, 0);
return 0;
}
+#endif /* WITH_LUA */
/*@=bounds =realcompare =sizeoftype =protoparammatch @*/
static int pgpHexSet(const char * pre, int lbits,
/*@out@*/ mpnumber * mpn, const byte * p, const byte * pend)
/*@globals fileSystem @*/
- /*@modifies *mpn, fileSystem @*/
+ /*@modifies mpn, fileSystem @*/
{
unsigned int mbits = pgpMpiBits(p);
unsigned int nbits;
strcpy(t+ix, pgpMpiHex(p));
if (_debug)
fprintf(stderr, "*** %s %s\n", pre, t);
- mpnsethex(mpn, t);
+ (void) mpnsethex(mpn, t);
t = _free(t);
if (_debug && _print)
fprintf(stderr, "\t %s ", pre), mpfprintln(stderr, mpn->size, mpn->data);
{
switch (i) {
case 0: /* m**d */
- mpnsethex(&_dig->c, pgpMpiHex(p));
+ (void) mpnsethex(&_dig->c, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t m**d = "), mpfprintln(stderr, _dig->c.size, _dig->c.data);
/*@switchbreak@*/ break;
if (_dig) {
switch (i) {
case 0: /* n */
- mpbsethex(&_dig->rsa_pk.n, pgpMpiHex(p));
+ (void) mpbsethex(&_dig->rsa_pk.n, pgpMpiHex(p));
/* Get the keyid */
if (_digp) {
uint32_t* np = _dig->rsa_pk.n.modl;
fprintf(stderr, "\t n = "), mpfprintln(stderr, _dig->rsa_pk.n.size, _dig->rsa_pk.n.modl);
/*@switchbreak@*/ break;
case 1: /* e */
- mpnsethex(&_dig->rsa_pk.e, pgpMpiHex(p));
+ (void) mpnsethex(&_dig->rsa_pk.e, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t e = "), mpfprintln(stderr, _dig->rsa_pk.e.size, _dig->rsa_pk.e.data);
/*@switchbreak@*/ break;
if (_dig) {
switch (i) {
case 0: /* p */
- mpbsethex(&_dig->p, pgpMpiHex(p));
+ (void) mpbsethex(&_dig->p, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t p = "), mpfprintln(stderr, _dig->p.size, _dig->p.modl);
/*@switchbreak@*/ break;
case 1: /* q */
- mpbsethex(&_dig->q, pgpMpiHex(p));
+ (void) mpbsethex(&_dig->q, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t q = "), mpfprintln(stderr, _dig->q.size, _dig->q.modl);
/*@switchbreak@*/ break;
case 2: /* g */
- mpnsethex(&_dig->g, pgpMpiHex(p));
+ (void) mpnsethex(&_dig->g, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t g = "), mpfprintln(stderr, _dig->g.size, _dig->g.data);
/*@switchbreak@*/ break;
case 3: /* y */
- mpnsethex(&_dig->y, pgpMpiHex(p));
+ (void) mpnsethex(&_dig->y, pgpMpiHex(p));
if (_debug && _print)
fprintf(stderr, "\t y = "), mpfprintln(stderr, _dig->y.size, _dig->y.data);
/*@switchbreak@*/ break;
if (!TOKEQ(t, "-----\n"))
goto exit;
+ crcdec = NULL;
+ crclen = 0;
if (b64decode(crcenc, (void **)&crcdec, &crclen) != 0)
continue;
crcpkt = pgpGrab(crcdec, crclen);
crcdec = _free(crcdec);
+ dec = NULL;
+ declen = 0;
if (b64decode(enc, (void **)&dec, &declen) != 0)
goto exit;
crc = pgpCRC(dec, declen);
t = stpcpy(t, "-----\n");
/*@=boundswrite@*/
+/*@-globstate@*/ /* XXX b64encode_eolstr */
return val;
+/*@=globstate@*/
}
/*@=boundsread@*/
+boolint #
+charint #
+ignorequals #
-+matchanyintegral #
+#+matchanyintegral #
#include <string.h>
#include "sexp.h"
-/*@access sexpIter @*/
/*@access sexpSimpleString @*/
-
-/*@access sexpList @*/
/*@access sexpString @*/
-/*@access sexpObject @*/
+/*@access sexpList @*/
+
+/*@access sexpObject @*/ /* XXX for casts only */
+/*@access sexpIter @*/ /* XXX for casts only */
/******************/
/* ERROR MESSAGES */
*/
sexpSimpleString newSimpleString(void)
{
- sexpSimpleString ss = (sexpSimpleString) sexpAlloc(sizeof(*ss));
+ sexpSimpleString ss = sexpAlloc(sizeof(*ss));
+
ss->length = 0;
ss->allocatedLength = 16;
ss->string = sexpAlloc(16);
/* simpleStringLength(ss)
* returns length of simple string
*/
-long int simpleStringLength(sexpSimpleString ss)
+size_t simpleStringLength(sexpSimpleString ss)
{
return ss->length;
}
if (ss == NULL) return NULL;
}
if (ss->string == NULL)
- ss->string = (octet *)sexpAlloc(16);
+ ss->string = sexpAlloc(16);
else {
size_t newsize = 16 + 3*(ss->length)/2;
octet * newstring = sexpAlloc(newsize);
{
int c;
skipChar(is,'"');
- while (length == -1 || simpleStringLength(ss) <= length) {
+ while (length == -1L || simpleStringLength(ss) <= length) {
if (is->nextChar == '\"') {
- if (length == -1 || (simpleStringLength(ss) == length)) {
+ if (length == -1L || simpleStringLength(ss) == length) {
skipChar(is,'\"');
return;
}
void canonicalPrintVerbatimSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
octet * c = simpleStringString(ss);
- long int len = simpleStringLength(ss);
- long int i;
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL)
ErrorMessage(ERROR, "Can't print NULL string verbatim");
/* print out len: */
- printDecimal(os, len);
+ printDecimal(os, (long int)len);
varPutChar(os, ':');
/* print characters in fragment */
for (i=0; i<len; i++) varPutChar(os, (int)*c++);
*/
int canPrintAsToken(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
octet * c = simpleStringString(ss);
- int i;
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL) return FALSE;
+/*@-unsignedcompare@*/ /* XXX len now unsigned size_t. */
if (len <= 0) return FALSE;
+/*@=unsignedcompare@*/
if (isDecDigit((int)*c)) return FALSE;
if (os->maxcolumn > 0 && os->column + len >= os->maxcolumn)
return FALSE;
*/
void advancedPrintTokenSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
octet * c = simpleStringString(ss);
- int i;
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (os->maxcolumn>0 && os->column > (os->maxcolumn - len))
os->newLine(os, ADVANCED);
/* advancedLengthSimpleStringToken(ss)
* Returns length for printing simple string ss as a token
*/
-int advancedLengthSimpleStringToken(sexpSimpleString ss)
+size_t advancedLengthSimpleStringToken(sexpSimpleString ss)
{
return simpleStringLength(ss);
}
*/
void advancedPrintVerbatimSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
octet * c = simpleStringString(ss);
- long int i;
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL)
ErrorMessage(ERROR, "Can't print NULL string verbatim");
if (os->maxcolumn>0 && os->column > (os->maxcolumn - len))
os->newLine(os, ADVANCED);
- printDecimal(os,len);
- os->putChar(os,':');
+ printDecimal(os, (long int)len);
+ os->putChar(os, ':');
for (i=0; i<len; i++) os->putChar(os, (int)*c++);
}
/* advancedLengthSimpleStringVerbatim(ss)
* Returns length for printing simple string ss in verbatim mode
*/
-int advancedLengthSimpleStringVerbatim(sexpSimpleString ss)
+size_t advancedLengthSimpleStringVerbatim(sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
- int i = 1;
+ size_t len = simpleStringLength(ss);
+ size_t i = 1;
while (len > 9L) { i++; len = len / 10; }
return (i+1+len);
}
*/
void advancedPrintBase64SimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
- octet *c = simpleStringString(ss);
- long int i;
+ octet * c = simpleStringString(ss);
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL)
ErrorMessage(ERROR, "Can't print NULL string base 64");
*/
void advancedPrintHexSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
- octet *c = simpleStringString(ss);
- long int i;
+ octet * c = simpleStringString(ss);
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL)
ErrorMessage(ERROR, "Can't print NULL string hexadecimal");
*/
int advancedLengthSimpleStringHexadecimal(sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
+ size_t len = simpleStringLength(ss);
return (1+2*len+1);
}
*/
int canPrintAsQuotedString(sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
- octet *c = simpleStringString(ss);
- long int i;
+ octet * c = simpleStringString(ss);
+ size_t len = simpleStringLength(ss);
+ size_t i;
if (c == NULL) return FALSE ;
+/*@-unsignedcompare@*/ /* XXX len now unsigned size_t. */
if (len < 0) return FALSE;
+/*@=unsignedcompare@*/
for (i=0; i<len; i++,c++) {
if (!isTokenChar((int)(*c)) && *c != ' ')
return FALSE;
*/
void advancedPrintQuotedStringSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
- octet *c = simpleStringString(ss);
- long int i;
+ octet * c = simpleStringString(ss);
+ size_t len = simpleStringLength(ss);
+ size_t i;
os->putChar(os, '\"');
for (i=0; i<len; i++) {
*/
int advancedLengthSimpleStringQuotedString(sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
+ size_t len = simpleStringLength(ss);
+
return (1+len+1);
}
*/
void advancedPrintSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
+ size_t len = simpleStringLength(ss);
if (canPrintAsToken(os, ss))
advancedPrintTokenSimpleString(os, ss);
/* advancedLengthSimpleString(os,ss)
* Returns length of printed image of s
*/
-int advancedLengthSimpleString(sexpOutputStream os, sexpSimpleString ss)
+size_t advancedLengthSimpleString(sexpOutputStream os, sexpSimpleString ss)
{
- long int len = simpleStringLength(ss);
+ size_t len = simpleStringLength(ss);
+
if (canPrintAsToken(os,ss))
return advancedLengthSimpleStringToken(ss);
else if (canPrintAsQuotedString(ss))
/* advancedLengthString(os,s)
* Returns length of printed image of string s
*/
-int advancedLengthString(sexpOutputStream os, sexpString s)
+size_t advancedLengthString(sexpOutputStream os, sexpString s)
{
sexpSimpleString ph = sexpStringPresentationHint(s);
sexpSimpleString ss = sexpStringString(s);
- int len = 0;
+ size_t len = 0;
if (ph != NULL)
len += 2+advancedLengthSimpleString(os, ph);
/* advancedLengthList(os,list)
* Returns length of printed image of list given as iterator
*/
-int advancedLengthList(sexpOutputStream os, sexpList list)
+size_t advancedLengthList(sexpOutputStream os, sexpList list)
{
sexpIter iter = sexpListIter(list);
sexpObject object;
- int len = 1; /* for left paren */
+ size_t len = 1; /* for left paren */
while (iter != NULL) {
object = sexpIterObject(iter);
sexpSimpleString newSimpleString(void)
/*@globals fileSystem @*/
/*@modifies fileSystem @*/;
-long int simpleStringLength(sexpSimpleString ss)
+size_t simpleStringLength(sexpSimpleString ss)
/*@*/;
/*@exposed@*/ /*@null@*/
octet *simpleStringString(sexpSimpleString ss)
--- /dev/null
+#include "system.h"
+
+#include "base64.h"
+#include "mpbarrett.h"
+#include "mp.h"
+#include "popt.h"
+
+#include "debug.h"
+
+const char * applechallenge = "09KF45soMYmvj6dpsUGiIg==";
+
+#if 1
+const char * rsaaeskey = "\
+5QYIqmdZGTONY5SHjEJrqAhaa0W9wzDC5i6q221mdGZJ5ubO6Kg\
+yhC6U83wpY87TFdPRdfPQl2kVC7+Uefmx1bXdIUo07ZcJsqMbgtje4w2JQw0b\
+Uw2BlzNPmVGQOxfdpGc3LXZzNE0jI1D4conUEiW6rrzikXBhk7Y/i2naw13ayy\
+xaSwtkiJ0ltBQGYGErbV2tx43QSNj7O0JIG9GrF2GZZ6/UHo4VH+ZXgQ4NZvP/\
+QXPCsLutZsvusFDzIEq7TN1fveINOiwrzlN+bckEixvhXlvoQTWE2tjbmQYhMvO\
+FIly5gNbZiXi0l5AdolX4jDC2vndFHqWDks/3sPikNg==\
+";
+#else
+const char * rsaaeskey = "5QYIqmdZGTONY5SHjEJrqAhaa0W9wzDC5i6q221mdGZJ5ubO6KgyhC6U83wpY87TFdPRdfPQl2kVC7+Uefmx1bXdIUo07ZcJsqMbgtje4w2JQw0bUw2BlzNPmVGQOxfdpGc3LXZzNE0jI1D4conUEiW6rrzikXBhk7Y/i2naw13ayyxaSwtkiJ0ltBQGYGErbV2tx43QSNj7O0JIG9GrF2GZZ6/UHo4VH+ZXgQ4NZvP/QXPCsLutZsvusFDzIEq7TN1fveINOiwrzlN+bckEixvhXlvoQTWE2tjbmQYhMvOFIly5gNbZiXi0l5AdolX4jDC2vndFHqWDks/3sPikNg==";
+#endif
+
+const char * aesiv = "zcZmAZtqh7uGcEwPXk0QeA==";
+
+const char * appleresponse = "\
+u+msU8Cc7KBrVPjI/Ir8fOL8+C5D3Jsw1+acaW3MNTndrTQAeb/a\
+5m10UVBX6wb/DYQGY+b28ksSwBjN0nFOk4Y2cODEf83FAh7B\
+mkLpmpkpplp7zVXQ+Z9DcB6gC60ZsS3t98aoR7tSzVLKZNgi2X2sC+vGsz\
+utQxX03HK008VjcdngHv3g1p2knoETd07T6eVfZCmPqp6Ga7Dj8VIIj/GEP3\
+AjjDx3lJnQBXUDmxM484YXLXZjWFXCiY8GJt6whjf7/2c3rIoT3Z7PQpEvPmM\
+1MXU9cv4NL59Y/q0OAVQ38foOz7eGAhfvjOsCnHU25aik7/7ToIYt1tyVtap/kA==\
+";
+
+/**
+ * Convert to hex.
+ * @param t target buffer (returned)
+ * @param s source bytes
+ * @param nbytes no. of bytes
+ * @return target buffer
+ */
+/*@unused@*/ static inline
+char * pgpHexCvt(/*@returned@*/ char *t, const byte *s, int nbytes)
+ /*@modifies *t @*/
+{
+ static char hex[] = "0123456789abcdef";
+/*@-boundswrite@*/
+ while (nbytes-- > 0) {
+ unsigned int i;
+ i = *s++;
+ *t++ = hex[ (i >> 4) & 0xf ];
+ *t++ = hex[ (i ) & 0xf ];
+ }
+ *t = '\0';
+/*@=boundswrite@*/
+ return t;
+}
+
+/**
+ * Return hex formatted representation of bytes.
+ * @todo Remove static buffer.
+ * @param p bytes
+ * @param plen no. of bytes
+ * @return hex formatted string
+ */
+/*@unused@*/ static inline /*@observer@*/
+char * pgpHexStr(const byte *p, unsigned int plen)
+ /*@*/
+{
+ static char prbuf[2048];
+ char *t = prbuf;
+ t = pgpHexCvt(t, p, plen);
+ return prbuf;
+}
+
+static int doit(const char * msg, const char * sig)
+{
+ unsigned char * dec;
+ size_t declen;
+ int rc;
+
+ if ((rc = b64decode(sig, (void **)&dec, &declen)) != 0) {
+ fprintf(stderr, "*** b64decode returns %d\n", rc);
+ return rc;
+ }
+
+ fprintf(stderr, "*** %p[%d] %s\n", dec, declen, msg);
+ if (declen == 256) {
+ fprintf(stderr, "%s\n", pgpHexStr(dec, declen/2));
+ fprintf(stderr, "%s\n", pgpHexStr(dec+declen/2, declen/2));
+ } else {
+ fprintf(stderr, "%s\n", pgpHexStr(dec, declen));
+ }
+
+ return 0;
+
+}
+
+int
+main (int argc, char *argv[])
+{
+
+ doit("applechallenge", applechallenge);
+ doit("rsaaeskey", rsaaeskey);
+ doit("aesiv", aesiv);
+ doit("appleresponse", appleresponse);
+}
if (grent == NULL) {
/* XXX The filesystem package needs group/lock w/o getgrnam. */
if (strcmp(thisGname, "lock") == 0) {
+/*@-boundswrite@*/
*gid = lastGid = 54;
+/*@=boundswrite@*/
return 0;
} else
if (strcmp(thisGname, "mail") == 0) {
+/*@-boundswrite@*/
*gid = lastGid = 12;
+/*@=boundswrite@*/
return 0;
} else
return -1;
/*@=constuse@*/
#endif
-extern int glob (const char *pattern, int flags,
- int (*errfunc) (const char *, int),
- /*@out@*/ glob_t *pglob)
+/*@-type@*/ /* XXX glob64_t */
+extern int glob (const char *__pattern, int __flags,
+ int (*__errfunc) (const char *, int),
+ /*@out@*/ glob_t *__pglob)
/*@globals errno, fileSystem @*/
- /*@modifies *pglob, errno, fileSystem @*/;
+ /*@modifies *__pglob, errno, fileSystem @*/;
/* XXX only annotation is a white lie */
-extern void globfree (/*@only@*/ glob_t *pglob)
- /*@modifies *pglob @*/;
+extern void globfree (/*@only@*/ glob_t *__pglob)
+ /*@modifies *__pglob @*/;
+/*@=type@*/
#ifdef _GNU_SOURCE
-extern int glob_pattern_p (const char *pattern, int quote)
+extern int glob_pattern_p (const char *__pattern, int __quote)
/*@*/;
#endif