gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] PATCH: shorter tmp-file names (for cygwin)


From: lode . leroy
Subject: [Gnu-arch-users] PATCH: shorter tmp-file names (for cygwin)
Date: Thu, 15 Jan 2004 16:39:15 +0100 (CET)
User-agent: SquirrelMail/1.4.1

It occurred to me that the problem with using tla on cygwin
is not as much the length of the paths that tla generates,
but the temporary directory names add about 60 chars.
reducing this makes it tla usable...

of course, whether you will run into the 240-odd limit will
depend on what file names you use, and the depth of
your source tree...

this is a better patch... I didn't test the import.
With this, it's possible to follow the tutorial up to
Importing_the_First_Revision...

diff -c -r ../../pkg/tla-1.2pre0/src/tla/libfsutils/tmp-files.c
src/tla/libfsutils/tmp-files.c
*** ../../pkg/tla-1.2pre0/src/tla/libfsutils/tmp-files.c        Sat Dec  6
20:35:27 2003
--- src/tla/libfsutils/tmp-files.c      Thu Jan 15 16:21:31 2004
***************
*** 41,49 ****
    cvt_ulong_to_decimal (pid_str, (unsigned long)pid);
    cvt_ulong_to_decimal (seq_str, (unsigned long)seq);

-   path = file_name_in_vicinity (0, dir, basename);
-   path = str_realloc_cat_many (0, path, ".", now_str, ".", pid_str, ".",
seq_str, str_end);

    return path;
  }

--- 41,60 ----
    cvt_ulong_to_decimal (pid_str, (unsigned long)pid);
    cvt_ulong_to_decimal (seq_str, (unsigned long)seq);


+ #ifndef __CYGWIN32__
+     path = file_name_in_vicinity (0, dir, basename);
+     path = str_realloc_cat_many (0, path, ".", now_str, ".", pid_str,
".", seq_str, str_end);
+ #else
+  {
+     t_uchar p;
+     p = basename[10];
+     basename[10]='\0';
+     path = file_name_in_vicinity (0, dir, basename);
+     path = str_realloc_cat_many (0, path, ".", seq_str, str_end);
+     basename[10]=p;
+  }
+ #endif
    return path;
  }




----------------------------------------------------------------------------------
Plaats je zoekertjes GRATIS op AdValvas
Placez votre petite annonce GRATUITEMENT sur AdValvas
http://www.advalvas.be




reply via email to

[Prev in Thread] Current Thread [Next in Thread]