pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files Avoid STAT as macro, it exi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c001f5cfd59b
branches: trunk
changeset: 549256:c001f5cfd59b
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Oct 30 16:00:54 2008 +0000
description:
Avoid STAT as macro, it exists in sys/dir.h on AIX already.
diffstat:
pkgtools/libnbcompat/files/__fts13.c | 22 ++++++++--------------
pkgtools/libnbcompat/files/__glob13.c | 20 +++++++-------------
2 files changed, 15 insertions(+), 27 deletions(-)
diffs (152 lines):
diff -r f9c34f88cf60 -r c001f5cfd59b pkgtools/libnbcompat/files/__fts13.c
--- a/pkgtools/libnbcompat/files/__fts13.c Thu Oct 30 14:52:14 2008 +0000
+++ b/pkgtools/libnbcompat/files/__fts13.c Thu Oct 30 16:00:54 2008 +0000
@@ -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 @@
#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 @@
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 @@
}
} 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 @@
*/
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 @@
const char *path;
{
int oldfd = fd, ret = -1;
- struct STAT sb;
+ struct stat sb;
if (ISSET(FTS_NOCHDIR))
return 0;
diff -r f9c34f88cf60 -r c001f5cfd59b pkgtools/libnbcompat/files/__glob13.c
--- a/pkgtools/libnbcompat/files/__glob13.c Thu Oct 30 14:52:14 2008 +0000
+++ b/pkgtools/libnbcompat/files/__glob13.c Thu Oct 30 16:00:54 2008 +0000
@@ -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 @@
#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 @@
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 @@
glob_t *pglob;
size_t *limit;
{
- struct STAT sb;
+ struct stat sb;
Char *p, *q;
int anymeta;
@@ -944,7 +938,7 @@
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 @@
static int
g_stat(fn, sb, pglob)
Char *fn;
- struct STAT *sb;
+ struct stat *sb;
glob_t *pglob;
{
char buf[MAXPATHLEN];
Home |
Main Index |
Thread Index |
Old Index