aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-07-23 11:00:44 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2010-07-23 11:00:44 +0300
commitc745039dcdc24e019205aa8d76f5231049c67b2b (patch)
tree2ca78587af7f13a32a6732b12fb39a6592de4883
parent6377e0dfecb9836aabca5d11f2dcfa7d722115af (diff)
downloadcpio-c745039dcdc24e019205aa8d76f5231049c67b2b.tar.gz
cpio-c745039dcdc24e019205aa8d76f5231049c67b2b.tar.bz2
Housekeeping.
* .gitignore: Sort. * src/cpiohdr.h: Fix indentation of preprocessor statements. * src/filetypes.h: Likewise.
-rw-r--r--.gitignore4
-rw-r--r--src/cpiohdr.h46
-rw-r--r--src/filetypes.h38
3 files changed, 44 insertions, 44 deletions
diff --git a/.gitignore b/.gitignore
index 5ae1208..ea5bcba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,12 @@
1*.a 1*.a
2*.o 2*.o
3*.tar.* 3*.patch
4*.shar.* 4*.shar.*
5*.tar.*
5*~ 6*~
6*.patch
7.bootstrap 7.bootstrap
8.deps 8.deps
9.emacs.desktop* 9.emacs.desktop*
10.emacsrc 10.emacsrc
11ABOUT-NLS 11ABOUT-NLS
12ChangeLog 12ChangeLog
diff --git a/src/cpiohdr.h b/src/cpiohdr.h
index bb1ad6b..86ec988 100644
--- a/src/cpiohdr.h
+++ b/src/cpiohdr.h
@@ -15,27 +15,27 @@
15 License along with this program; if not, write to the Free 15 License along with this program; if not, write to the Free
16 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301 USA. */ 17 Boston, MA 02110-1301 USA. */
18 18
19#ifndef _CPIOHDR_H 19#ifndef _CPIOHDR_H
20 20
21#define _CPIOHDR_H 1 21# define _CPIOHDR_H 1
22 22
23#include <cpio.h> 23# include <cpio.h>
24 24
25#ifdef HAVE_ATTRIB_PACKED 25# ifdef HAVE_ATTRIB_PACKED
26#define ATTRIB_PACKED __attribute__((packed)) 26# define ATTRIB_PACKED __attribute__((packed))
27#endif 27# endif
28 28
29#ifdef HAVE_PRAGMA_PACK 29# ifdef HAVE_PRAGMA_PACK
30#pragma pack(1) 30# pragma pack(1)
31#endif 31# endif
32 32
33#ifdef HAVE_PRAGMA_PACK_HPPA 33# ifdef HAVE_PRAGMA_PACK_HPPA
34#pragma pack 1 34# pragma pack 1
35#endif 35# endif
36 36
37struct old_cpio_header 37struct old_cpio_header
38{ 38{
39 unsigned short c_magic; 39 unsigned short c_magic;
40 unsigned short c_dev; 40 unsigned short c_dev;
41 unsigned short c_ino; 41 unsigned short c_ino;
@@ -46,19 +46,19 @@ struct old_cpio_header
46 unsigned short c_rdev; 46 unsigned short c_rdev;
47 unsigned short c_mtimes[2]; 47 unsigned short c_mtimes[2];
48 unsigned short c_namesize; 48 unsigned short c_namesize;
49 unsigned short c_filesizes[2]; 49 unsigned short c_filesizes[2];
50} ATTRIB_PACKED; 50} ATTRIB_PACKED;
51 51
52#ifdef HAVE_PRAGMA_PACK 52# ifdef HAVE_PRAGMA_PACK
53#pragma pack(1) 53# pragma pack(1)
54#endif 54# endif
55 55
56#ifdef HAVE_PRAGMA_PACK_HPPA 56# ifdef HAVE_PRAGMA_PACK_HPPA
57#pragma pack 1 57# pragma pack 1
58#endif 58# endif
59struct old_ascii_header 59struct old_ascii_header
60{ 60{
61 char c_magic[6]; 61 char c_magic[6];
62 char c_dev[6]; 62 char c_dev[6];
63 char c_ino[6]; 63 char c_ino[6];
64 char c_mode[6]; 64 char c_mode[6];
@@ -78,19 +78,19 @@ struct old_ascii_header
78 and variable length file data. 78 and variable length file data.
79 A header for a filename "TRAILER!!!" indicates the end of the archive. */ 79 A header for a filename "TRAILER!!!" indicates the end of the archive. */
80 80
81/* All the fields in the header are ISO 646 (approximately ASCII) strings 81/* All the fields in the header are ISO 646 (approximately ASCII) strings
82 of hexadecimal numbers, left padded, not NUL terminated: */ 82 of hexadecimal numbers, left padded, not NUL terminated: */
83 83
84#ifdef HAVE_PRAGMA_PACK 84# ifdef HAVE_PRAGMA_PACK
85#pragma pack(1) 85# pragma pack(1)
86#endif 86# endif
87 87
88#ifdef HAVE_PRAGMA_PACK_HPPA 88# ifdef HAVE_PRAGMA_PACK_HPPA
89#pragma pack 1 89# pragma pack 1
90#endif 90# endif
91struct new_ascii_header 91struct new_ascii_header
92{ 92{
93 char c_magic[6]; /* "070701" for "new" portable format 93 char c_magic[6]; /* "070701" for "new" portable format
94 "070702" for CRC format */ 94 "070702" for CRC format */
95 char c_ino[8]; 95 char c_ino[8];
96 char c_mode[8]; 96 char c_mode[8];
diff --git a/src/filetypes.h b/src/filetypes.h
index 81f0c32..252a1db 100644
--- a/src/filetypes.h
+++ b/src/filetypes.h
@@ -16,68 +16,68 @@
16 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 16 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301 USA. */ 17 Boston, MA 02110-1301 USA. */
18 18
19/* Include sys/types.h and sys/stat.h before this file. */ 19/* Include sys/types.h and sys/stat.h before this file. */
20 20
21#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */ 21#ifndef S_ISREG /* Doesn't have POSIX.1 stat stuff. */
22#define mode_t unsigned short 22# define mode_t unsigned short
23#endif 23#endif
24 24
25/* Define the POSIX macros for systems that lack them. */ 25/* Define the POSIX macros for systems that lack them. */
26#if !defined(S_ISBLK) && defined(S_IFBLK) 26#if !defined(S_ISBLK) && defined(S_IFBLK)
27#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) 27# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
28#endif 28#endif
29#if !defined(S_ISCHR) && defined(S_IFCHR) 29#if !defined(S_ISCHR) && defined(S_IFCHR)
30#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) 30# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
31#endif 31#endif
32#if !defined(S_ISDIR) && defined(S_IFDIR) 32#if !defined(S_ISDIR) && defined(S_IFDIR)
33#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 33# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
34#endif 34#endif
35#if !defined(S_ISREG) && defined(S_IFREG) 35#if !defined(S_ISREG) && defined(S_IFREG)
36#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) 36# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
37#endif 37#endif
38#if !defined(S_ISFIFO) && defined(S_IFIFO) 38#if !defined(S_ISFIFO) && defined(S_IFIFO)
39#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) 39# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
40#endif 40#endif
41#if !defined(S_ISLNK) && defined(S_IFLNK) 41#if !defined(S_ISLNK) && defined(S_IFLNK)
42#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) 42# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
43#endif 43#endif
44#if !defined(S_ISSOCK) && defined(S_IFSOCK) 44#if !defined(S_ISSOCK) && defined(S_IFSOCK)
45#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) 45# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
46#endif 46#endif
47#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX network special */ 47#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX network special */
48#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) 48# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
49#endif 49#endif
50 50
51/* Define the file type bits used in cpio archives. 51/* Define the file type bits used in cpio archives.
52 They have the same values as the S_IF bits in traditional Unix. */ 52 They have the same values as the S_IF bits in traditional Unix. */
53 53
54#define CP_IFMT 0170000 /* Mask for all file type bits. */ 54#define CP_IFMT 0170000 /* Mask for all file type bits. */
55 55
56#if defined(S_ISBLK) 56#if defined(S_ISBLK)
57#define CP_IFBLK 0060000 57# define CP_IFBLK 0060000
58#endif 58#endif
59#if defined(S_ISCHR) 59#if defined(S_ISCHR)
60#define CP_IFCHR 0020000 60# define CP_IFCHR 0020000
61#endif 61#endif
62#if defined(S_ISDIR) 62#if defined(S_ISDIR)
63#define CP_IFDIR 0040000 63# define CP_IFDIR 0040000
64#endif 64#endif
65#if defined(S_ISREG) 65#if defined(S_ISREG)
66#define CP_IFREG 0100000 66# define CP_IFREG 0100000
67#endif 67#endif
68#if defined(S_ISFIFO) 68#if defined(S_ISFIFO)
69#define CP_IFIFO 0010000 69# define CP_IFIFO 0010000
70#endif 70#endif
71#if defined(S_ISLNK) 71#if defined(S_ISLNK)
72#define CP_IFLNK 0120000 72# define CP_IFLNK 0120000
73#endif 73#endif
74#if defined(S_ISSOCK) 74#if defined(S_ISSOCK)
75#define CP_IFSOCK 0140000 75# define CP_IFSOCK 0140000
76#endif 76#endif
77#if defined(S_ISNWK) 77#if defined(S_ISNWK)
78#define CP_IFNWK 0110000 78# define CP_IFNWK 0110000
79#endif 79#endif
80 80
81#ifndef S_ISLNK 81#ifndef S_ISLNK
82#define lstat stat 82# define lstat stat
83#endif 83#endif

Return to:

Send suggestions and report system problems to the System administrator.