]> granicus.if.org Git - vim/commitdiff
patch 8.2.3044: Amiga MorphOS and AROS: process ID is not valid v8.2.3044
authorola.soder@axis.com <ola.soder@axis.com>
Thu, 24 Jun 2021 16:50:30 +0000 (18:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 24 Jun 2021 16:50:30 +0000 (18:50 +0200)
Problem:    Amiga MorphOS and AROS: process ID is not valid.
Solution:   Use FindTask to return something which is unique to all processes.
            (Ola Söder, closes #8444)

src/os_amiga.c
src/version.c

index 7609ef73b680afb9b2f55f56fd175fc6ed8b50a1..e2326b947742d937abc23c060410aa226b262152 100644 (file)
@@ -446,7 +446,7 @@ mch_check_win(int argc, char **argv)
      * we use a pointer to the current task instead. This should be a
      * shared structure and thus globally unique.
      */
-#ifdef __amigaos4__
+#if !defined(__amigaos4__) && !defined(__AROS__) && !defined(__MORPHOS__)
     sprintf((char *)buf1, "t:nc%p", FindTask(0));
 #else
     sprintf((char *)buf1, "t:nc%ld", (long)buf1);
@@ -706,7 +706,7 @@ mch_get_host_name(char_u *s, int len)
     long
 mch_get_pid(void)
 {
-#ifdef __amigaos4__
+#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
     // This is as close to a pid as we can come. We could use CLI numbers also,
     // but then we would have two different types of process identifiers.
     return((long)FindTask(0));
index b49d4c2cc13d384a2b42d1f9e7d37cbadf06afe9..d77119c06f47039dc83f9164b2c1047f50641f18 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3044,
 /**/
     3043,
 /**/