Skip to content

Commit ce71c1f

Browse files
committed
Merge branch 'dm/port2zos'
z/OS port * dm/port2zos: compat/bswap.h: detect endianness from XL C compiler macros Makefile: reorder linker flags in the git executable rule git-compat-util.h: support variadic macros with the XL C compiler
2 parents c1777a2 + bfb0e6f commit ce71c1f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,8 +1610,8 @@ git.sp git.s git.o: EXTRA_CPPFLAGS = \
16101610
'-DGIT_INFO_PATH="$(infodir_relative_SQ)"'
16111611

16121612
git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS)
1613-
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
1614-
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
1613+
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) git.o \
1614+
$(BUILTIN_OBJS) $(LIBS)
16151615

16161616
help.sp help.s help.o: common-cmds.h
16171617

compat/bswap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ static inline uint64_t git_bswap64(uint64_t x)
122122
# define GIT_BYTE_ORDER GIT_BIG_ENDIAN
123123
# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
124124
# define GIT_BYTE_ORDER GIT_LITTLE_ENDIAN
125+
# elif defined(__THW_BIG_ENDIAN__) && !defined(__THW_LITTLE_ENDIAN__)
126+
# define GIT_BYTE_ORDER GIT_BIG_ENDIAN
127+
# elif defined(__THW_LITTLE_ENDIAN__) && !defined(__THW_BIG_ENDIAN__)
128+
# define GIT_BYTE_ORDER GIT_LITTLE_ENDIAN
125129
# else
126130
# error "Cannot determine endianness"
127131
# endif

git-compat-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ void git_qsort(void *base, size_t nmemb, size_t size,
778778
#endif
779779
#endif
780780

781-
#if defined(__GNUC__) || (_MSC_VER >= 1400)
781+
#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__C99_MACRO_WITH_VA_ARGS)
782782
#define HAVE_VARIADIC_MACROS 1
783783
#endif
784784

0 commit comments

Comments
 (0)