diff options
author | Pixel <Pixel> | 2002-06-23 15:37:45 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2002-06-23 15:37:45 +0000 |
commit | b3c377e647b5eb14c2ed0ff27db4ac14a3fd4e2d (patch) | |
tree | 7905392c81d466a6e5c0fc89ca118a044c26cb52 | |
parent | 7514019f385767caf7e68ae281d3a4befb7b4e8f (diff) |
Attribute ((packed)) fix...
-rwxr-xr-x | Makefile | 4 | ||||
-rwxr-xr-x | VP/Makefile | 2 | ||||
-rwxr-xr-x | Xenogears/Makefile | 2 | ||||
-rw-r--r-- | cdutils.cpp | 2 | ||||
-rw-r--r-- | cdutils.h | 5 | ||||
-rw-r--r-- | generic.h | 4 | ||||
-rw-r--r-- | lzss.h | 2 | ||||
-rw-r--r-- | psxdev/Makefile | 8 | ||||
-rw-r--r-- | psxdev/xadecode.h | 4 | ||||
-rw-r--r-- | str-util.cpp | 2 |
10 files changed, 22 insertions, 13 deletions
@@ -3,7 +3,7 @@ CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror CXX=g++ -SUBDIRS = psxdev Xenogears VP +SUBDIRS = psxdev Xenogears VP MegamanX5 TARGET = lzss dlzss cd-tool str-tool all: subdirs ${TARGET} @@ -30,6 +30,6 @@ str-tool: str-util.o generic.h generic.o fileutils.o fileutils.h cdutils.o cduti ${CXX} ${LDFLAGS} str-util.o generic.o fileutils.o cdutils.o yazedc.o psxdev/bs.o psxdev/idctfst.o psxdev/jfdctint.o psxdev/vlc.o -o str-tool -lSDL clean: - rm -f *.o ${TARGET} compil.c for d in ${SUBDIRS} ; do make -C $$d clean ; done + rm -f *.o ${TARGET} compil.c diff --git a/VP/Makefile b/VP/Makefile index 890516b..608cf7e 100755 --- a/VP/Makefile +++ b/VP/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f -CPPFLAGS=-Wall -g -I. -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I.. +CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I.. CXX=g++ TARGET = main_dump VP-CD1.sqr diff --git a/Xenogears/Makefile b/Xenogears/Makefile index 3df895f..9b8d9db 100755 --- a/Xenogears/Makefile +++ b/Xenogears/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/make -f -CPPFLAGS=-Wall -g -I. -O3 -mcpu=i686 -I.. -pedantic -pedantic-errors -Werror +CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -pedantic-errors -Werror -I.. CXX=g++ TARGET = reinsert main_dump Decrypt script-comp script-dec XenoCD1.sqr XenoCD2.sqr diff --git a/cdutils.cpp b/cdutils.cpp index 230099c..0dd0e8a 100644 --- a/cdutils.cpp +++ b/cdutils.cpp @@ -22,9 +22,9 @@ #include <malloc.h> #include <stdlib.h> #include <unistd.h> +#include "generic.h" #include "cdutils.h" #include "fileutils.h" -#include "generic.h" FILE * ppf_file = 0; int pt1 = -1, pt2 = -1, snum = 0, ptl = 0, root = 0; @@ -20,7 +20,8 @@ #ifndef __CDUTILS_H__ #define __CDUTILS_H__ -#include <yazedc.h> +#include "yazedc.h" +#include "generic.h" #define GUESS 5 @@ -45,7 +46,7 @@ struct DirEntry { unsigned short BEVolSeq; unsigned char N; char id; -} __attribute__((packed)); +} PACKED; extern struct DirEntry rootDir; @@ -69,6 +69,10 @@ typedef Uint16 Word; typedef Uint32 DWord; #endif +#if defined __linux__ || defined __CYGWIN32__ +#define PACKED __attribute__((packed)) +#endif + extern char verbosity; void printm(int level, char * fmt, ...); char ** split(char * s, char t); @@ -21,7 +21,7 @@ #define __LZSS_H__ #include <stdio.h> -#include <generic.h> +#include "generic.h" #define LZSS_VERSION "3.0.0-pre1" #define LZSS_NAME "lzss" diff --git a/psxdev/Makefile b/psxdev/Makefile index 5cc33ca..fb1cc78 100644 --- a/psxdev/Makefile +++ b/psxdev/Makefile @@ -1,15 +1,17 @@ +#!/usr/bin/make -f + TARGETS=xadecode.o bs.o idctfst.o jfdctint.o vlc.o CC=gcc -CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic +CPPFLAGS=-Wall -g -O3 -mcpu=i686 -pedantic -I.. # -Werror # -pedantic-errors -all: $(TARGETS) +all: ${TARGETS} bstoppm: xadecode.o bs.o idctfst.o jfdtint.o vlc.o bstoppm.o ${CC} ${LDFLAGS} xadecode.o bs.o idcfst.o jfdtint.o vlc.o bstoppm.o -o bstoppm clean: - rm -f *.o + rm -f *.o ${TARGETS} diff --git a/psxdev/xadecode.h b/psxdev/xadecode.h index 264012c..025d36a 100644 --- a/psxdev/xadecode.h +++ b/psxdev/xadecode.h @@ -3,6 +3,8 @@ slightly modified by dbalster */ +#include "generic.h" + #ifndef XADECODE_H #define XADECODE_H @@ -50,7 +52,7 @@ typedef char SoundGroup[128]; typedef struct SoundSector { char sectorFiller[8]; SoundGroup SoundGroups[kNumOfSGs]; -} __attribute__((packed)) SoundSector; +} PACKED SoundSector; typedef unsigned long DWORD; typedef unsigned short WORD; diff --git a/str-util.cpp b/str-util.cpp index 33c7a6a..7c76917 100644 --- a/str-util.cpp +++ b/str-util.cpp @@ -40,7 +40,7 @@ struct STR_Header { Uint32 StMOVIE_HEADM; Uint32 StMOVIE_HEADV; Uint16 Channels; -} __attribute__((packed)); +} PACKED; Byte * video = 0, * audio = 0; |