git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb6606b
)
include sys/types.h, also
author
kramm
<kramm>
Mon, 29 Oct 2001 18:36:13 +0000
(18:36 +0000)
committer
kramm
<kramm>
Mon, 29 Oct 2001 18:36:13 +0000
(18:36 +0000)
src/swfdump.c
patch
|
blob
|
history
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
df55e9b
..
34323c7
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-7,9
+7,20
@@
\r
This file is distributed under the GPL, see file COPYING for details */
\r
\r
\r
This file is distributed under the GPL, see file COPYING for details */
\r
\r
+#define HAVE_STAT
\r
+
\r
#ifdef HAVE_SYS_STAT_H
\r
#include <sys/stat.h>
\r
#ifdef HAVE_SYS_STAT_H
\r
#include <sys/stat.h>
\r
+#else
\r
+#undef HAVE_STAT
\r
+#endif
\r
+
\r
+#ifdef HAVE_SYS_TYPES_H
\r
+#include <sys/types.h>
\r
+#else
\r
+#undef HAVE_STAT
\r
#endif
\r
#endif
\r
+
\r
#include <unistd.h>
\r
#include <stdio.h>
\r
#include <fcntl.h>
\r
#include <unistd.h>
\r
#include <stdio.h>
\r
#include <fcntl.h>
\r
@@
-60,7
+71,7
@@
int main (int argc,char ** argv)
{
\r
SWF swf;
\r
TAG*tag;
\r
{
\r
SWF swf;
\r
TAG*tag;
\r
-#ifdef HAVE_SYS_STAT_H
\r
+#ifdef HAVE_STAT
\r
struct stat statbuf;
\r
#endif
\r
int f;
\r
struct stat statbuf;
\r
#endif
\r
int f;
\r
@@
-84,7
+95,7
@@
int main (int argc,char ** argv)
exit(1);
\r
}
\r
\r
exit(1);
\r
}
\r
\r
-#ifdef HAVE_SYS_STAT_H
\r
+#ifdef HAVE_STAT
\r
fstat(f, &statbuf);
\r
if(statbuf.st_size != swf.FileSize)
\r
fprintf(stderr, "Error: Real Filesize (%d) doesn't match header Filesize (%d)",
\r
fstat(f, &statbuf);
\r
if(statbuf.st_size != swf.FileSize)
\r
fprintf(stderr, "Error: Real Filesize (%d) doesn't match header Filesize (%d)",
\r