From 23e4a7bd7b12700b0122763175fa17fb962f1538 Mon Sep 17 00:00:00 2001 From: "Thomas \"Cakeisalie5\" Touhey" Date: Fri, 27 Jan 2017 21:53:34 +0100 Subject: [PATCH] New targets (all-.exe), corrected mcsfile --- .gitignore | 2 +- Makefile | 4 ++-- src/mcsfile/main.h | 10 ++++++++++ src/mcsfile/print.c | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 61abbfb..12a83dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ /obj /man /p7* -/mcsfile +/mcsfile* .*.swp diff --git a/Makefile b/Makefile index 1a0c727..5078246 100755 --- a/Makefile +++ b/Makefile @@ -149,7 +149,7 @@ $(eval $(call make-binaryobj-rule,$(bin),$(obj))))) define make-binary-rules $1$(if $(FOR_WINDOWS),.exe): $(SRC_$1:%=$(OBJDIR)/$1/%.o) | $(OBJDIR)/$1 $(call bcmd,ld,$$@,$(LD) -o $$@ $$^ $(LDFLAGS_$1)) - all-$1: $(CHECKCFG) $1$(if $(FOR_WINDOWS),.exe) all-doc-$1 + all-$1 all-$1.exe: $(CHECKCFG) $1$(if $(FOR_WINDOWS),.exe) all-doc-$1 clean-$1: $(call rmsg,Removing $1 and its objects directory.) @@ -196,7 +196,7 @@ $(eval $(call make-installbinary-rule,$(bin)))) .PHONY: all-bins mostlyclean-bins mclean-bins clean-bins re-bins .PHONY: install-bins uninstall-bins -.PHONY: $(foreach b,$(BINARIES),all-$(b) clean-$(b) re-$(b) \ +.PHONY: $(foreach b,$(BINARIES),all-$(b) all-$(b).exe clean-$(b) re-$(b) \ install-$(b) uninstall-$(b)) #******************************************************************************# # Documentation-related # diff --git a/src/mcsfile/main.h b/src/mcsfile/main.h index 6f43799..64fc6eb 100644 --- a/src/mcsfile/main.h +++ b/src/mcsfile/main.h @@ -11,6 +11,16 @@ # define MAIN_H # include +/* Some printf types */ +# ifdef _WIN64 +# define PRIuSIZE "l64u" +# elif _WIN32 +# define PRIuSIZE "u" +# else +# define PRIuSIZE "zu" +# endif + +/* Prototypes */ int parse_args(int ac, char **av, const char **paths); void put_files(g1m_t *handle); diff --git a/src/mcsfile/print.c b/src/mcsfile/print.c index 59f1476..e61eee8 100644 --- a/src/mcsfile/print.c +++ b/src/mcsfile/print.c @@ -60,7 +60,7 @@ static void sort_files(g1m_t *handle) static void put_description(g1m_mcsfile_t *file) { if (!file->type) - printf("unknown content (%zu octets)\n", file->content_size); + printf("unknown content (%" PRIuSIZE" octets)\n", file->content_size); else if (file->type & g1m_mcstype_program) { printf("program ("); if (g1m_has_password(file)) printf("password: '%s')\n", file->password);