Skip to content

Commit 457bb45

Browse files
gerberbgitster
authored andcommitted
Port to 12 other Platforms.
This patch adds support to compile and run git on 12 additional platforms. The platforms are based on UNIX Systems Labs (USL)/Novell/SYS V code base. The most common are Novell UnixWare 2.X.X, SCO UnixWare 7.X.X, OpenServer 5.0.X, OpenServer 6.0.X, and SCO pre OSR 5 platforms. Looking at the the various platform headers, I find: #if defined(_KERNEL) || !defined(_POSIX_SOURCE) \ && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) which hides u_short and other typedefs that other header files on these platforms depend on. WIth _XOPEN_SOURCE defined, sources that include system header files that depend on the typedefs such as u_short cannot be compiled on these platforms. __USLC__ indicates UNIX System Labs Corperation (USLC), or a Novell-derived compiler and/or some SysV based OS's. __M_UNIX indicates XENIX/SCO UNIX/OpenServer 5.0.7 and prior releases of the SCO OS's. It is used just like Apple and BSD, both of these shouldn't have _XOPEN_SOURCE defined. This is with suggestions and modifications from Daniel Barkalow, Junio C Hamano, Thomas Harning, and Jeremy Maitin-Shepard. Signed-off-by: Boyd Lynn Gerber <gerberb@zenez.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent d4c4444 commit 457bb45

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,45 @@ endif
564564
ifeq ($(uname_S),GNU/kFreeBSD)
565565
NO_STRLCPY = YesPlease
566566
endif
567+
ifeq ($(uname_S),UnixWare)
568+
CC = cc
569+
NEEDS_SOCKET = YesPlease
570+
NEEDS_NSL = YesPlease
571+
NEEDS_SSL_WITH_CRYPTO = YesPlease
572+
NEEDS_LIBICONV = YesPlease
573+
SHELL_PATH = /usr/local/bin/bash
574+
NO_IPV6 = YesPlease
575+
NO_HSTRERROR = YesPlease
576+
BASIC_CFLAGS += -Kthread
577+
BASIC_CFLAGS += -I/usr/local/include
578+
BASIC_LDFLAGS += -L/usr/local/lib
579+
INSTALL = ginstall
580+
TAR = gtar
581+
NO_STRCASESTR = YesPlease
582+
NO_MEMMEM = YesPlease
583+
endif
584+
ifeq ($(uname_S),SCO_SV)
585+
ifeq ($(uname_R),3.2)
586+
CFLAGS = -O2
587+
endif
588+
ifeq ($(uname_R),5)
589+
CC = cc
590+
BASIC_CFLAGS += -Kthread
591+
endif
592+
NEEDS_SOCKET = YesPlease
593+
NEEDS_NSL = YesPlease
594+
NEEDS_SSL_WITH_CRYPTO = YesPlease
595+
NEEDS_LIBICONV = YesPlease
596+
SHELL_PATH = /usr/bin/bash
597+
NO_IPV6 = YesPlease
598+
NO_HSTRERROR = YesPlease
599+
BASIC_CFLAGS += -I/usr/local/include
600+
BASIC_LDFLAGS += -L/usr/local/lib
601+
NO_STRCASESTR = YesPlease
602+
NO_MEMMEM = YesPlease
603+
INSTALL = ginstall
604+
TAR = gtar
605+
endif
567606
ifeq ($(uname_S),Darwin)
568607
NEEDS_SSL_WITH_CRYPTO = YesPlease
569608
NEEDS_LIBICONV = YesPlease

git-compat-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
/* Approximation of the length of the decimal representation of this type. */
4040
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
4141

42-
#if !defined(__APPLE__) && !defined(__FreeBSD__)
42+
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX)
4343
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
4444
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
4545
#endif

0 commit comments

Comments
 (0)