Browse Source

* define Unix for Linux 1.0 compilers

peter 25 years ago
parent
commit
b52915a0ca
2 changed files with 14 additions and 0 deletions
  1. 7 0
      compiler/Makefile
  2. 7 0
      compiler/Makefile.fpc

+ 7 - 0
compiler/Makefile

@@ -109,6 +109,13 @@ export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
 # Pre Settings
 # Pre Settings
 #####################################################################
 #####################################################################
 
 
+# Define Unix also for Linux
+ifeq ($(OS_TARGET),linux)
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+override FPCOPT+=-dUNIX
+endif
+endif
+
 # Don't export OS_SOURCE because it can change after the first compile
 # Don't export OS_SOURCE because it can change after the first compile
 unexport OS_SOURCE FPC_VERSION
 unexport OS_SOURCE FPC_VERSION
 
 

+ 7 - 0
compiler/Makefile.fpc

@@ -24,6 +24,13 @@ toolupx=1
 
 
 
 
 [presettings]
 [presettings]
+# Define Unix also for Linux
+ifeq ($(OS_TARGET),linux)
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
+override FPCOPT+=-dUNIX
+endif
+endif
+
 # Don't export OS_SOURCE because it can change after the first compile
 # Don't export OS_SOURCE because it can change after the first compile
 unexport OS_SOURCE FPC_VERSION
 unexport OS_SOURCE FPC_VERSION