diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-30 15:35:23 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-12-30 15:35:23 (GMT) |
commit | 9e0633c91090e3254056b33bf8bd1ec4533982a6 (patch) | |
tree | f680ede529eb7bb1c7739884038499e4b6229356 /Utilities/cmtar/encode.c | |
parent | bc447c7f92730303c16d34cbe3747854b4c776c3 (diff) | |
download | CMake-9e0633c91090e3254056b33bf8bd1ec4533982a6.zip CMake-9e0633c91090e3254056b33bf8bd1ec4533982a6.tar.gz CMake-9e0633c91090e3254056b33bf8bd1ec4533982a6.tar.bz2 |
BUG: Several Borland fixes
Diffstat (limited to 'Utilities/cmtar/encode.c')
-rw-r--r-- | Utilities/cmtar/encode.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Utilities/cmtar/encode.c b/Utilities/cmtar/encode.c index cadac67..3c8cb6a 100644 --- a/Utilities/cmtar/encode.c +++ b/Utilities/cmtar/encode.c @@ -157,12 +157,6 @@ th_set_device(TAR *t, dev_t device) printf("th_set_device(): major = %d, minor = %d\n", major(device), minor(device)); #endif -#ifndef major -# define major(dev) ((int)(((dev) >> 8) & 0xff)) -#endif -#ifndef minor -# define minor(dev) ((int)((dev) & 0xff)) -#endif int_to_oct(major(device), t->th_buf.devmajor, 8); int_to_oct(minor(device), t->th_buf.devminor, 8); } @@ -209,7 +203,8 @@ th_set_mode(TAR *t, mode_t fmode) fmode |= S_IFIFO; } #endif - int_to_oct(fmode, (t)->th_buf.mode, 8); + /* Looks like on windows the st_mode is longer than 8 characters. */ + int_to_oct(fmode & 07777777, (t)->th_buf.mode, 8); } |