summaryrefslogtreecommitdiff
path: root/firmware/test/fat
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2012-05-08 08:53:38 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2012-05-08 13:00:56 +0200
commit18c016b4e0262bc2e23a193fc7c8fb92907303b1 (patch)
treef7fec7d10ef99ffdbdb417e7d3ff0bb611e7f0f5 /firmware/test/fat
parent10829b2f78de91f66c7da5f7a2a2fe6d252eb38d (diff)
Fix test fat failing on 64bit system (second bit of FS#12646)
We use unsigned long/long in number of places in fat.c. When this is used to cast 32bit fat field it fails on 64bit systems. This patch introduces explicit types (uint16_t, uint32_t) only in places which influence how fat structures are interpreted. Change-Id: I0be44d0b355f9de20b4deb221698d095f55d4bde Reviewed-on: http://gerrit.rockbox.org/232 Reviewed-by: Frank Gevaerts <frank@gevaerts.be> Reviewed-by: Torne Wuff <torne@wolfpuppy.org.uk>
Diffstat (limited to 'firmware/test/fat')
-rw-r--r--firmware/test/fat/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/test/fat/Makefile b/firmware/test/fat/Makefile
index 3e04724f67..77c299dfca 100644
--- a/firmware/test/fat/Makefile
+++ b/firmware/test/fat/Makefile
@@ -7,15 +7,15 @@ BUILDDATE=$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d')
INCLUDE = -I$(EXPORT) -I$(FIRMWARE)/include -I$(FIRMWARE)/target/hosted -I$(FIRMWARE)/target/hosted/sdl
DEFINES = -DTEST_FAT -DDEBUG -DDISK_WRITE -DHAVE_FAT16SUPPORT -D__PCTOOL__
-CFLAGS = -g -m32 -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) $(BUILDDATE) -I. $(INCLUDE) -I$(FIRMWARE)/libc/include
-SIMFLAGS = -g -m32 -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE)
+CFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) $(BUILDDATE) -I. $(INCLUDE) -I$(FIRMWARE)/libc/include
+SIMFLAGS = -g -Wall -std=gnu99 -Wno-pointer-sign $(DEFINES) -I. $(INCLUDE)
TARGET = fat
all: $(TARGET)
$(TARGET): fat.o ata-sim.o main.o disk.o dir.o file.o ctype.o unicode.o strlcpy.o
- gcc -g -m32 -o fat $+
+ gcc -g -o fat $+
fat.o: $(DRIVERS)/fat.c $(EXPORT)/fat.h $(EXPORT)/ata.h
$(CC) $(CFLAGS) -c $< -o $@