Skip to content
  • David Michael's avatar
    compat: convert modes to use portable file type values · d543d9c0
    David Michael authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    This adds simple wrapper functions around calls to stat(), fstat(),
    and lstat() that translate the operating system's native file type
    bits to those used by most operating systems.  It also rewrites the
    S_IF* macros to the common values, so all file type processing is
    performed using the translated modes.  This makes projects portable
    across operating systems that use different file type definitions.
    
    Only the file type bits may be affected by these compatibility
    functions; the file permission bits are assumed to be 07777 and are
    passed through unchanged.
    
    Signed-off-by: default avatarDavid Michael <fedora.dm0@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    d543d9c0