From 0314007b8e4e327d9c82bf76a457fecf5568732f Mon Sep 17 00:00:00 2001 From: Pavan Deolasee Date: Mon, 15 Feb 2016 23:58:58 +0530 Subject: [PATCH] Use "expr" instead of "bc" for arithmetic since "bc" may not be available on all platforms --- src/Makefile.global.in | 4 ++-- src/common/Makefile | 2 +- src/port/Makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Makefile.global.in b/src/Makefile.global.in index d70f2007fe..07d60aa1e0 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -877,7 +877,7 @@ ifeq ($(GCC), yes) -cat $@.E | grep -E "do .*errstart|do .*elog_start" >> $(top_srcdir)/MSGIDS -rm -f $@.E $(COMPILE.c) -DPGXL_MSG_MODULE=$(PGXL_MSG_MODULE) -DPGXL_MSG_FILEID=$(PGXL_MSG_FILEID) -o $@ $< -MMD -MP -MF $(DEPDIR)/$(*F).Po - $(eval PGXL_MSG_FILEID := $(shell echo $(PGXL_MSG_FILEID) + 1 | bc)) + $(eval PGXL_MSG_FILEID := $(shell expr $(PGXL_MSG_FILEID) + 1)) endif # GCC else ifeq ($(GCC), yes) @@ -886,7 +886,7 @@ ifeq ($(GCC), yes) -cat $@.E | grep -E "do .*errstart|do .*elog_start" >> $(top_srcdir)/MSGIDS -rm -f $@.E $(COMPILE.c) -DPGXL_MSG_MODULE=$(PGXL_MSG_MODULE) -DPGXL_MSG_FILEID=$(PGXL_MSG_FILEID) -o $@ $< - $(eval PGXL_MSG_FILEID := $(shell echo $(PGXL_MSG_FILEID) + 1 | bc)) + $(eval PGXL_MSG_FILEID := $(shell expr $(PGXL_MSG_FILEID) + 1)) endif # GCC endif # autodepend diff --git a/src/common/Makefile b/src/common/Makefile index 63a187703d..b4e3f67c6e 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -64,7 +64,7 @@ ifeq ($(genmsgids), yes) PGXL_MSG_FILEID := 1 %_srv.o: %.c %.o $(CC) $(CFLAGS) -DPGXL_MSG_MODULE=$(PGXL_MSG_MODULE) -DPGXL_MSG_FILEID=$(PGXL_MSG_FILEID) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ - $(eval PGXL_MSG_FILEID := $(shell echo $(PGXL_MSG_FILEID) + 1 | bc)) + $(eval PGXL_MSG_FILEID := $(shell expr $(PGXL_MSG_FILEID) + 1)) else %_srv.o: %.c %.o $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ diff --git a/src/port/Makefile b/src/port/Makefile index 6bf3dcf868..2aca390720 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -80,7 +80,7 @@ ifeq ($(genmsgids), yes) PGXL_MSG_FILEID := 1 %_srv.o: %.c %.o $(CC) $(CFLAGS) -DPGXL_MSG_MODULE=$(PGXL_MSG_MODULE) -DPGXL_MSG_FILEID=$(PGXL_MSG_FILEID) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ - $(eval PGXL_MSG_FILEID := $(shell echo $(PGXL_MSG_FILEID) + 1 | bc)) + $(eval PGXL_MSG_FILEID := $(shell expr $(PGXL_MSG_FILEID) + 1)) else %_srv.o: %.c %.o $(CC) $(CFLAGS) $(subst -DFRONTEND,, $(CPPFLAGS)) -c $< -o $@ -- 2.39.5