]> git.lyx.org Git - features.git/commitdiff
second try
authorAndré Pönitz <poenitz@gmx.net>
Wed, 3 Oct 2007 22:27:31 +0000 (22:27 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 3 Oct 2007 22:27:31 +0000 (22:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20722 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 5903009e35b13d02cd3921dc08ff6c3f2093002a..d467215e307e64b6935c278aea2f8203d58c8856 100644 (file)
@@ -119,7 +119,6 @@ using std::vector;
 using std::string;
 using std::time_t;
 
-
 namespace lyx {
 
 using support::addName;
@@ -2020,13 +2019,17 @@ private:
 };
 
 
+#if !defined (HAVE_FORK)
+# define fork() -1
+#endif
+
 int AutoSaveBuffer::generateChild()
 {
        // tmp_ret will be located (usually) in /tmp
        // will that be a problem?
-       pid_t const pid = fork(); // If you want to debug the autosave
-       // you should set pid to -1, and comment out the
-       // fork.
+       pid_t const pid = fork();
+       // If you want to debug the autosave
+       // you should set pid to -1, and comment out the fork.
        if (pid == 0 || pid == -1) {
                // pid = -1 signifies that lyx was unable
                // to fork. But we will do the save