/[tar]/tar/src/system.c
ViewVC logotype

Diff of /tar/src/system.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by eggert, Thu Nov 13 06:23:23 2003 UTC revision 1.4 by gray, Mon Nov 17 11:05:06 2003 UTC
# Line 66  sys_spawn_shell () Line 66  sys_spawn_shell ()
66    spawnl (P_WAIT, getenv ("COMSPEC"), "-", 0);    spawnl (P_WAIT, getenv ("COMSPEC"), "-", 0);
67  }  }
68    
69  void  /* stat() in djgpp's C library gives a constant number of 42 as the
70  sys_compare_uid_gid (struct stat *a, struct stat *b)     uid and gid of a file.  So, comparing an FTP'ed archive just after
71       unpack would fail on MSDOS.  */
72    
73    bool
74    sys_compare_uid (struct stat *a, struct stat *b)
75  {  {
76    /* stat() in djgpp's C library gives a constant number of 42 as the    return true;
77       uid and gid of a file.  So, comparing an FTP'ed archive just after  }
78       unpack would fail on MSDOS.  */  
79    bool
80    sys_compare_gid (struct stat *a, struct stat *b)
81    {
82      return true;
83  }  }
84    
85  void  void
86  sys_compare_links (struct stat *link_data, struct stat *stat_data)  sys_compare_links (struct stat *link_data, struct stat *stat_data)
87  {  {
88      return true;
89  }  }
90    
91  int  int
# Line 230  sys_spawn_shell () Line 239  sys_spawn_shell ()
239      }      }
240  }  }
241    
242  void  bool
243  sys_compare_uid_gid (struct stat *a, struct stat *b)  sys_compare_uid (struct stat *a, struct stat *b)
244  {  {
245    if (a->st_uid != b->st_uid)    return a->st_uid == b->st_uid;
     report_difference (_("Uid differs"));  
   if (a->st_gid != b->st_gid)  
     report_difference (_("Gid differs"));  
246  }  }
247    
248  void  bool
249    sys_compare_gid (struct stat *a, struct stat *b)
250    {
251      return a->st_gid == b->st_gid;
252    }
253    
254    bool
255  sys_compare_links (struct stat *link_data, struct stat *stat_data)  sys_compare_links (struct stat *link_data, struct stat *stat_data)
256  {  {
257    if (stat_data->st_dev != link_data->st_dev    return stat_data->st_dev == link_data->st_dev
258        || stat_data->st_ino != link_data->st_ino)           && stat_data->st_ino == link_data->st_ino;
     {  
       report_difference (_("Not linked to %s"),  
                          quote (current_stat_info.link_name));  
     }  
259  }  }
260    
261  int  int

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26