This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Mark as valid use of d_namelen et.al. in gdb_dirent.sh
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 01 Feb 2003 15:59:36 -0500
- Subject: [commit] Mark as valid use of d_namelen et.al. in gdb_dirent.sh
Hello,
This marks as valid the only legitimtate uses of:
#include <dirent.h>
dirent->d_namelen
strlen (dirent->d_name)
committed,
Andrew
2003-02-01 Andrew Cagney <ac131313@redhat.com>
* gdb_dirent.h: Mark up valid uses of <dirent.h>, d_namelen and
strlen d_name.
Index: gdb_dirent.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_dirent.h,v
retrieving revision 1.2
diff -u -r1.2 gdb_dirent.h
--- gdb_dirent.h 31 Dec 2002 12:41:00 -0000 1.2
+++ gdb_dirent.h 1 Feb 2003 20:54:18 -0000
@@ -23,11 +23,11 @@
/* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */
#ifdef HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMELEN(dirent) strlen((dirent)->d_name)
+# include <dirent.h> /* OK: dirent.h */
+# define NAMELEN(dirent) strlen ((dirent)->d_name) /* OK: strlen d_name */
#else
# define dirent direct
-# define NAMELEN(dirent) (dirent)->d_namelen
+# define NAMELEN(dirent) (dirent)->d_namelen /* OK: d_namelen */
# ifdef HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif