Browse Source

* Fixed two linux'isms, and commited Jonas fix for the RTE 103

marco 23 years ago
parent
commit
69e84fd1e4
3 changed files with 21 additions and 5 deletions
  1. 8 2
      demo/linux/Makefile
  2. 2 0
      demo/linux/Makefile.fpc
  3. 11 3
      demo/linux/daemon.pp

+ 8 - 2
demo/linux/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 1.1 [2002/01/29]
+# Don't edit, this file is generated by FPCMake Version 1.1 [2002/02/04]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx
@@ -182,6 +182,12 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
 ifeq ($(OS_TARGET),linux)
 ifeq ($(OS_TARGET),linux)
 override TARGET_PROGRAMS+=daemon
 override TARGET_PROGRAMS+=daemon
 endif
 endif
+ifeq ($(OS_TARGET),freebsd)
+override TARGET_PROGRAMS+=daemon
+endif
+ifeq ($(OS_TARGET),netbsd)
+override TARGET_PROGRAMS+=daemon
+endif
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 override UNITSDIR+=$(REQUIRE_UNITSDIR)
 endif
 endif
@@ -908,7 +914,7 @@ ifdef INSTALL_UNITS
 override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
 override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(INSTALL_UNITS))
 endif
 endif
 ifdef INSTALL_BUILDUNIT
 ifdef INSTALL_BUILDUNIT
-override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT),$(INSTALLPPUFILES))
+override INSTALLPPUFILES:=$(filter-out $(INSTALL_BUILDUNIT)$(PPUEXT),$(INSTALLPPUFILES))
 endif
 endif
 ifdef INSTALLPPUFILES
 ifdef INSTALLPPUFILES
 override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))
 override INSTALLPPULINKFILES:=$(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(STATICLIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))

+ 2 - 0
demo/linux/Makefile.fpc

@@ -4,6 +4,8 @@
 
 
 [target]
 [target]
 programs_linux=daemon
 programs_linux=daemon
+programs_freebsd=daemon
+programs_netbsd=daemon
 
 
 [default]
 [default]
 fpcdir=../..
 fpcdir=../..

+ 11 - 3
demo/linux/daemon.pp

@@ -85,11 +85,15 @@ Begin
    aTerm^.handler.sh := @DoSig;
    aTerm^.handler.sh := @DoSig;
    aTerm^.sa_mask := 0;
    aTerm^.sa_mask := 0;
    aTerm^.sa_flags := 0;
    aTerm^.sa_flags := 0;
-   aTerm^.sa_restorer := nil;
+   {$ifndef BSD}		{Linux'ism}
+    aTerm^.sa_restorer := nil;
+   {$endif}
    aHup^.handler.sh := @DoSig;
    aHup^.handler.sh := @DoSig;
    aHup^.sa_mask := 0;
    aHup^.sa_mask := 0;
    aHup^.sa_flags := 0;
    aHup^.sa_flags := 0;
-   aHup^.sa_restorer := nil;
+   {$ifndef BSD}		{Linux'ism}
+    aHup^.sa_restorer := nil;
+   {$endif}
    SigAction(SIGTERM,aTerm,aOld);
    SigAction(SIGTERM,aTerm,aOld);
    SigAction(SIGHUP,aHup,aOld);
    SigAction(SIGHUP,aHup,aOld);
 
 
@@ -115,6 +119,7 @@ Begin
          {$I-}
          {$I-}
          Close(fLog);
          Close(fLog);
          {$I+}
          {$I+}
+   	 IOResult;
          NewLog;
          NewLog;
          bHup := false;
          bHup := false;
       End;
       End;
@@ -136,7 +141,10 @@ Begin
 End.
 End.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  2001-05-03 21:39:33  peter
+  Revision 1.2  2002-02-25 12:56:43  marco
+   * Fixed two linux'isms, and commited Jonas fix for the RTE 103
+
+  Revision 1.1  2001/05/03 21:39:33  peter
     * moved to own module
     * moved to own module
 
 
   Revision 1.2  2000/07/13 11:33:09  michael
   Revision 1.2  2000/07/13 11:33:09  michael