diff options
-rw-r--r-- | libfat/libfat.h | 6 | ||||
-rw-r--r-- | libfat/libfatint.h | 4 | ||||
-rw-r--r-- | libfat/open.c | 4 | ||||
-rw-r--r-- | mtools/syslinux.c | 6 | ||||
-rw-r--r-- | unix/syslinux.c | 6 | ||||
-rw-r--r-- | win32/Makefile | 14 |
6 files changed, 23 insertions, 17 deletions
diff --git a/libfat/libfat.h b/libfat/libfat.h index b0682279..58bf6b5a 100644 --- a/libfat/libfat.h +++ b/libfat/libfat.h @@ -33,7 +33,7 @@ struct libfat_filesystem; /* * Open the filesystem. The readfunc is the function to read * sectors, in the format: - * int readfunc(void *readptr, void *buf, size_t secsize, + * int readfunc(intptr_t readptr, void *buf, size_t secsize, * libfat_sector_t secno) * * ... where readptr is a private argument. @@ -41,8 +41,8 @@ struct libfat_filesystem; * A return value of != secsize is treated as error. */ struct libfat_filesystem * -libfat_open(int (*readfunc)(void *, void *, size_t, libfat_sector_t), - void *readptr); +libfat_open(int (*readfunc)(intptr_t, void *, size_t, libfat_sector_t), + intptr_t readptr); void libfat_close(struct libfat_filesystem *); diff --git a/libfat/libfatint.h b/libfat/libfatint.h index 6da47f18..67b67b22 100644 --- a/libfat/libfatint.h +++ b/libfat/libfatint.h @@ -36,8 +36,8 @@ enum fat_type { }; struct libfat_filesystem { - int (*read)(void *, void *, size_t, libfat_sector_t); - void *readptr; + int (*read)(intptr_t, void *, size_t, libfat_sector_t); + intptr_t readptr; enum fat_type fat_type; unsigned int clustsize; diff --git a/libfat/open.c b/libfat/open.c index 835c336d..a66d21e7 100644 --- a/libfat/open.c +++ b/libfat/open.c @@ -23,8 +23,8 @@ #include "ulint.h" struct libfat_filesystem * -libfat_open(int (*readfunc)(void *, void *, size_t, libfat_sector_t), - void *readptr) +libfat_open(int (*readfunc)(intptr_t, void *, size_t, libfat_sector_t), + intptr_t readptr) { struct libfat_filesystem *fs = NULL; struct fat_bootsect *bs; diff --git a/mtools/syslinux.c b/mtools/syslinux.c index 69d7a3dd..d29108ed 100644 --- a/mtools/syslinux.c +++ b/mtools/syslinux.c @@ -113,10 +113,10 @@ ssize_t xpwrite(int fd, void *buf, size_t count, off_t offset) /* * Version of the read function suitable for libfat */ -int libfat_xpread(void *pp, void *buf, size_t secsize, libfat_sector_t sector) +int libfat_xpread(intptr_t pp, void *buf, size_t secsize, libfat_sector_t sector) { off_t offset = (off_t)sector * secsize; - return xpread((int)pp, buf, secsize, offset); + return xpread(pp, buf, secsize, offset); } @@ -248,7 +248,7 @@ int main(int argc, char *argv[]) /* * Now, use libfat to create a block map */ - fs = libfat_open(libfat_xpread, (void *)dev_fd); + fs = libfat_open(libfat_xpread, dev_fd); ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL); secp = sectors; nsectors = 0; diff --git a/unix/syslinux.c b/unix/syslinux.c index 182e1bf9..e5041cda 100644 --- a/unix/syslinux.c +++ b/unix/syslinux.c @@ -152,10 +152,10 @@ ssize_t xpwrite(int fd, void *buf, size_t count, off_t offset) /* * Version of the read function suitable for libfat */ -int libfat_xpread(void *pp, void *buf, size_t secsize, libfat_sector_t sector) +int libfat_xpread(intptr_t pp, void *buf, size_t secsize, libfat_sector_t sector) { off_t offset = (off_t)sector * secsize; - return xpread((int)pp, buf, secsize, offset); + return xpread(pp, buf, secsize, offset); } int main(int argc, char *argv[]) @@ -442,7 +442,7 @@ umount: * this is supposed to be a simple, privileged version * of the installer. */ - fs = libfat_open(libfat_xpread, (void *)dev_fd); + fs = libfat_open(libfat_xpread, dev_fd); ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL); secp = sectors; nsectors = 0; diff --git a/win32/Makefile b/win32/Makefile index c0894261..83595365 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -52,18 +52,24 @@ OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS))) VPATH = .:..:../libfat -all: installer +TARGETS = syslinux.exe + +ifeq ($(CC_IS_OK),0) +all: $(TARGETS) +else +all: + rm -f $(TARGETS) +endif tidy: -rm -f *.o *.i *.s *.a .*.d clean: tidy - -rm -f syslinux.exe spotless: clean - -rm -f *~ + -rm -f *~ $(TARGETS) -installer: syslinux.exe +installer: syslinux.exe: $(OBJS) $(CC) $(LDFLAGS) -o $@ $^ |