Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Nov 2008 19:56:10 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185218 - head/tools/regression/fstest
Message-ID:  <200811231956.mANJuA9M062271@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sun Nov 23 19:56:09 2008
New Revision: 185218
URL: http://svn.freebsd.org/changeset/base/185218

Log:
  Detect operating system automatically.

Modified:
  head/tools/regression/fstest/Makefile

Modified: head/tools/regression/fstest/Makefile
==============================================================================
--- head/tools/regression/fstest/Makefile	Sun Nov 23 19:52:56 2008	(r185217)
+++ head/tools/regression/fstest/Makefile	Sun Nov 23 19:56:09 2008	(r185218)
@@ -1,10 +1,26 @@
 # $FreeBSD$
 
-CFLAGS+=-DHAS_LCHMOD
-CFLAGS+=-DHAS_CHFLAGS
-CFLAGS+=-DHAS_LCHFLAGS
-#CFLAGS+=-DHAS_TRUNCATE64
-#CFLAGS+=-DHAS_STAT64
+OSTYPE=$(shell uname)
+
+ifeq "${OSTYPE}" "FreeBSD"
+CFLAGS += -D__OS_FreeBSD__
+CFLAGS += -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
+endif
+
+ifeq "${OSTYPE}" "SunOS"
+CFLAGS += -D__OS_Solaris__
+CFLAGS += -DHAS_TRUNCATE64 -DHAS_STAT64
+endif
+
+ifeq "${OSTYPE}" "Darwin"
+CFLAGS += -D__OS_Darwin__
+CFLAGS += -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_LCHFLAGS
+endif
+
+ifeq "${OSTYPE}" "Linux"
+CFLAGS += -D__OS_Linux__
+CFLAGS += -D_GNU_SOURCE
+endif
 
 all:	fstest
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811231956.mANJuA9M062271>