need longlink patch in checked out tree
[debian/tar] / src / tar.c
index 928cfddd44a86220ab444844cac61c10da6495aa..ac44de865039eaebaa5d26d955204abff14c90f2 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -2566,6 +2566,16 @@ decode_options (int argc, char **argv)
   report_textual_dates (&args);
 }
 
+/* Debian specific environment variable used by pristine-tar to enable use of
+ * longlinks for filenames exactly 100 bytes long. */
+void debian_longlink_hack_init () {
+ char *s=getenv ("TAR_LONGLINK_100");
+ if (s && strcmp(s, "1") == 0)
+        debian_longlink_hack=1;
+ else
+        debian_longlink_hack=0;
+}
+
 \f
 /* Tar proper.  */
 
@@ -2585,6 +2595,8 @@ main (int argc, char **argv)
   filename_terminator = '\n';
   set_quoting_style (0, DEFAULT_QUOTING_STYLE);
 
+  debian_longlink_hack_init ();
+
   /* Make sure we have first three descriptors available */
   stdopen ();