/[gentoo-projects]/pax-utils/scanelf.c
Gentoo

Diff of /pax-utils/scanelf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.136 Revision 1.137
1/* 1/*
2 * Copyright 2003-2006 Gentoo Foundation 2 * Copyright 2003-2006 Gentoo Foundation
3 * Distributed under the terms of the GNU General Public License v2 3 * Distributed under the terms of the GNU General Public License v2
4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.136 2006/03/17 15:27:00 solar Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.137 2006/03/19 02:41:17 solar Exp $
5 * 5 *
6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10#include "paxinc.h" 10#include "paxinc.h"
11 11#ifdef __linux__
12 #include <glob.h>
13#endif
12static const char *rcsid = "$Id: scanelf.c,v 1.136 2006/03/17 15:27:00 solar Exp $"; 14static const char *rcsid = "$Id: scanelf.c,v 1.137 2006/03/19 02:41:17 solar Exp $";
13#define argv0 "scanelf" 15#define argv0 "scanelf"
14 16
15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 17#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
16 18
17#define do_state(option, flag) \ 19#define do_state(option, flag) \
1290 while ((fgets(path, __PAX_UTILS_PATH_MAX, fp)) != NULL) { 1292 while ((fgets(path, __PAX_UTILS_PATH_MAX, fp)) != NULL) {
1291 if ((p = strrchr(path, '\r')) != NULL) 1293 if ((p = strrchr(path, '\r')) != NULL)
1292 *p = 0; 1294 *p = 0;
1293 if ((p = strchr(path, '\n')) != NULL) 1295 if ((p = strchr(path, '\n')) != NULL)
1294 *p = 0; 1296 *p = 0;
1295#ifdef HAVE_GLOB 1297#ifdef __linux__
1296 // recursive includes of the same file will make this segfault. 1298 // recursive includes of the same file will make this segfault.
1297 if ((memcmp(path, "include", 7) == 0) && isblank(path[7])) { 1299 if ((memcmp(path, "include", 7) == 0) && isblank(path[7])) {
1298 glob64_t gl; 1300 glob64_t gl;
1299 size_t x; 1301 size_t x;
1300 char gpath[__PAX_UTILS_PATH_MAX]; 1302 char gpath[__PAX_UTILS_PATH_MAX];

Legend:
Removed from v.1.136  
changed lines
  Added in v.1.137

  ViewVC Help
Powered by ViewVC 1.1.20