diff options
author | joerg <joerg@pkgsrc.org> | 2008-10-30 16:00:54 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2008-10-30 16:00:54 +0000 |
commit | 18058a4e576654be6b735b7ee701abb71e2f8600 (patch) | |
tree | 12fc9be19594575d33e5bbff3d29dccd66a53c35 /pkgtools | |
parent | c67f903d999a72ef736645658bde5b7e1d81d58c (diff) | |
download | pkgsrc-18058a4e576654be6b735b7ee701abb71e2f8600.tar.gz |
Avoid STAT as macro, it exists in sys/dir.h on AIX already.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/libnbcompat/files/__fts13.c | 22 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/__glob13.c | 20 |
2 files changed, 15 insertions, 27 deletions
diff --git a/pkgtools/libnbcompat/files/__fts13.c b/pkgtools/libnbcompat/files/__fts13.c index 211d60aa91a..f4909f2b902 100644 --- a/pkgtools/libnbcompat/files/__fts13.c +++ b/pkgtools/libnbcompat/files/__fts13.c @@ -1,4 +1,4 @@ -/* $NetBSD: __fts13.c,v 1.9 2007/09/21 19:51:58 joerg Exp $ */ +/* $NetBSD: __fts13.c,v 1.10 2008/10/30 16:00:54 joerg Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -__RCSID("$NetBSD: __fts13.c,v 1.9 2007/09/21 19:51:58 joerg Exp $"); +__RCSID("$NetBSD: __fts13.c,v 1.10 2008/10/30 16:00:54 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -80,12 +80,6 @@ __weak_alias(fts_set,_fts_set) #endif /* __weak_alias */ #endif -#ifdef __LIBC12_SOURCE__ -#define STAT stat12 -#else -#define STAT stat -#endif - #if 0 #ifdef __LIBC12_SOURCE__ __warn_references(fts_children, @@ -897,7 +891,7 @@ fts_stat(sp, p, follow) FTSENT *t; dev_t dev; ino_t ino; - struct STAT *sbp, sb; + struct stat *sbp, sb; int saved_errno; _DIAGASSERT(sp != NULL); @@ -934,7 +928,7 @@ fts_stat(sp, p, follow) } } else if (lstat(p->fts_accpath, sbp)) { p->fts_errno = errno; -err: memset(sbp, 0, sizeof(struct STAT)); +err: memset(sbp, 0, sizeof(struct stat)); return (FTS_NS); } @@ -1034,19 +1028,19 @@ fts_alloc(sp, name, namelen) */ len = sizeof(FTSENT) + namelen; if (!ISSET(FTS_NOSTAT)) - len += sizeof(struct STAT) + ALIGNBYTES; + len += sizeof(struct stat) + ALIGNBYTES; if ((p = malloc(len)) == NULL) return (NULL); if (!ISSET(FTS_NOSTAT)) p->fts_statp = - (struct STAT *)ALIGN((unsigned long)(p->fts_name + namelen + 2)); + (struct stat *)ALIGN((unsigned long)(p->fts_name + namelen + 2)); #else if ((p = malloc(sizeof(FTSENT) + namelen)) == NULL) return (NULL); if (!ISSET(FTS_NOSTAT)) - if ((p->fts_statp = malloc(sizeof(struct STAT))) == NULL) { + if ((p->fts_statp = malloc(sizeof(struct stat))) == NULL) { free(p); return (NULL); } @@ -1198,7 +1192,7 @@ fts_safe_changedir(sp, p, fd, path) const char *path; { int oldfd = fd, ret = -1; - struct STAT sb; + struct stat sb; if (ISSET(FTS_NOCHDIR)) return 0; diff --git a/pkgtools/libnbcompat/files/__glob13.c b/pkgtools/libnbcompat/files/__glob13.c index 8cb00880388..37e5aede2c9 100644 --- a/pkgtools/libnbcompat/files/__glob13.c +++ b/pkgtools/libnbcompat/files/__glob13.c @@ -1,4 +1,4 @@ -/* $NetBSD: __glob13.c,v 1.2 2007/07/31 13:17:33 joerg Exp $ */ +/* $NetBSD: __glob13.c,v 1.3 2008/10/30 16:00:54 joerg Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #else -__RCSID("$NetBSD: __glob13.c,v 1.2 2007/07/31 13:17:33 joerg Exp $"); +__RCSID("$NetBSD: __glob13.c,v 1.3 2008/10/30 16:00:54 joerg Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -100,12 +100,6 @@ __weak_alias(globfree,_globfree) #endif #ifdef __LIBC12_SOURCE__ -#define STAT stat12 -#else -#define STAT stat -#endif - -#ifdef __LIBC12_SOURCE__ __warn_references(glob, "warning: reference to compatibility glob(); include <glob.h> for correct reference") __warn_references(globfree, @@ -164,10 +158,10 @@ typedef char Char; static int compare __P((const void *, const void *)); static int g_Ctoc __P((const Char *, char *, size_t)); -static int g_lstat __P((Char *, struct STAT *, glob_t *)); +static int g_lstat __P((Char *, struct stat *, glob_t *)); static DIR *g_opendir __P((Char *, glob_t *)); static Char *g_strchr __P((const Char *, int)); -static int g_stat __P((Char *, struct STAT *, glob_t *)); +static int g_stat __P((Char *, struct stat *, glob_t *)); static int glob0 __P((const Char *, glob_t *)); static int glob1 __P((Char *, glob_t *, size_t *)); static int glob2 __P((Char *, Char *, Char *, Char *, glob_t *, @@ -605,7 +599,7 @@ glob2(pathbuf, pathend, pathlim, pattern, pglob, limit) glob_t *pglob; size_t *limit; { - struct STAT sb; + struct stat sb; Char *p, *q; int anymeta; @@ -944,7 +938,7 @@ g_opendir(str, pglob) static int g_lstat(fn, sb, pglob) Char *fn; - struct STAT *sb; + struct stat *sb; glob_t *pglob; { char buf[MAXPATHLEN]; @@ -963,7 +957,7 @@ g_lstat(fn, sb, pglob) static int g_stat(fn, sb, pglob) Char *fn; - struct STAT *sb; + struct stat *sb; glob_t *pglob; { char buf[MAXPATHLEN]; |