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

Diff of /pax-utils/scanmacho.c

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

Revision 1.9 Revision 1.10
1/* 1/*
2 * Copyright 2008 Gentoo Foundation 2 * Copyright 2008 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/scanmacho.c,v 1.9 2008/12/30 12:39:53 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v 1.10 2008/12/30 13:09:20 vapier Exp $
5 * 5 *
6 * based on scanelf by: 6 * based on scanelf by:
7 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org> 7 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org>
8 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org> 8 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org>
9 * for Darwin specific fun: 9 * for Darwin specific fun:
10 * 2008 Fabian Groffen - <grobian@gentoo.org> 10 * 2008 Fabian Groffen - <grobian@gentoo.org>
11 */ 11 */
12 12
13static const char *rcsid = "$Id: scanmacho.c,v 1.9 2008/12/30 12:39:53 vapier Exp $"; 13static const char *rcsid = "$Id: scanmacho.c,v 1.10 2008/12/30 13:09:20 vapier Exp $";
14const char * const argv0 = "scanmacho"; 14const char * const argv0 = "scanmacho";
15 15
16#include "paxinc.h" 16#include "paxinc.h"
17 17
18#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 18#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
51static char g_match = 0; 51static char g_match = 0;
52 52
53static int match_bits = 0; 53static int match_bits = 0;
54static unsigned int match_perms = 0; 54static unsigned int match_perms = 0;
55 55
56static char *getstr_perms(const char *fname);
57static char *getstr_perms(const char *fname) 56static const char *getstr_perms(const char *fname)
58{ 57{
59 struct stat st; 58 struct stat st;
60 static char buf[8]; 59 static char buf[8];
61 60
62 if ((stat(fname, &st)) == (-1)) 61 if (stat(fname, &st) == -1)
63 return (char *) ""; 62 return "";
64 63
65 snprintf(buf, sizeof(buf), "%o", st.st_mode); 64 snprintf(buf, sizeof(buf), "%o", st.st_mode);
66 65
67 return (char *) buf + 2; 66 return buf + 2;
68} 67}
69 68
70static const char *macho_file_needed_lib( 69static const char *macho_file_needed_lib(
71 fatobj *fobj, 70 fatobj *fobj,
72 char *found_needed, 71 char *found_needed,

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20