]>
Dogcows Code - chaz/tar/blob - src/testpad.c
1 /* Find out if we need the pad field in the header for this machine
2 Copyright (C) 1991 Free Software Foundation
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2, or (at
7 your option) any later version.
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
46 FILE *fp
= fopen("testpad.h", "w");
50 fprintf (stderr
, "testpad: cannot open ");
55 t1diff
= (char *)&t1
.in
[0] - (char *)&t1
;
56 t2diff
= (char *)&t2
.in
[0] - (char *)&t2
;
58 if (t2diff
== t1diff
+ 1)
59 fprintf (fp
, "#define NEEDPAD\n");
60 else if (t1diff
!= t2diff
)
61 fprintf (stderr
, "Cannot determine padding for tar struct, \n\
62 will try with none.\n");
This page took 0.033859 seconds and 4 git commands to generate.