Fossil SCM
Get the build working on Windows again.
Commit
d474c95d5a35c66b247a7a80415e8d1e39a00b20f5bd0fad7d62e75290d700e8
Parent
efc7475e180bb40…
1 file changed
+4
+4
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -730,23 +730,26 @@ | ||
| 730 | 730 | |
| 731 | 731 | /* |
| 732 | 732 | ** Change access permissions on a file. |
| 733 | 733 | */ |
| 734 | 734 | void file_set_mode(const char *zFN, int fd, const char *zMode, int bNoErr){ |
| 735 | +#if !defined(_WIN32) | |
| 735 | 736 | mode_t m; |
| 736 | 737 | char *zEnd = 0; |
| 737 | 738 | m = strtol(zMode, &zEnd, 0); |
| 738 | 739 | if( (zEnd[0] || fchmod(fd, m)) && !bNoErr ){ |
| 739 | 740 | fossil_fatal("cannot change permissions on %s to \"%s\"", |
| 740 | 741 | zFN, zMode); |
| 741 | 742 | } |
| 743 | +#endif | |
| 742 | 744 | } |
| 743 | 745 | |
| 744 | 746 | /* Change the owner of a file to zOwner. zOwner can be of the form |
| 745 | 747 | ** USER:GROUP. |
| 746 | 748 | */ |
| 747 | 749 | void file_set_owner(const char *zFN, int fd, const char *zOwner){ |
| 750 | +#if !defined(_WIN32) | |
| 748 | 751 | const char *zGrp; |
| 749 | 752 | const char *zUsr = zOwner; |
| 750 | 753 | struct passwd *pw; |
| 751 | 754 | struct group *grp; |
| 752 | 755 | uid_t uid = -1; |
| @@ -773,10 +776,11 @@ | ||
| 773 | 776 | fossil_fatal("cannot change ownership of %s to %s",zFN, zOwner); |
| 774 | 777 | } |
| 775 | 778 | if( zOwner!=zUsr ){ |
| 776 | 779 | fossil_free((char*)zUsr); |
| 777 | 780 | } |
| 781 | +#endif | |
| 778 | 782 | } |
| 779 | 783 | |
| 780 | 784 | |
| 781 | 785 | /* |
| 782 | 786 | ** Delete a file. |
| 783 | 787 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -730,23 +730,26 @@ | |
| 730 | |
| 731 | /* |
| 732 | ** Change access permissions on a file. |
| 733 | */ |
| 734 | void file_set_mode(const char *zFN, int fd, const char *zMode, int bNoErr){ |
| 735 | mode_t m; |
| 736 | char *zEnd = 0; |
| 737 | m = strtol(zMode, &zEnd, 0); |
| 738 | if( (zEnd[0] || fchmod(fd, m)) && !bNoErr ){ |
| 739 | fossil_fatal("cannot change permissions on %s to \"%s\"", |
| 740 | zFN, zMode); |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | /* Change the owner of a file to zOwner. zOwner can be of the form |
| 745 | ** USER:GROUP. |
| 746 | */ |
| 747 | void file_set_owner(const char *zFN, int fd, const char *zOwner){ |
| 748 | const char *zGrp; |
| 749 | const char *zUsr = zOwner; |
| 750 | struct passwd *pw; |
| 751 | struct group *grp; |
| 752 | uid_t uid = -1; |
| @@ -773,10 +776,11 @@ | |
| 773 | fossil_fatal("cannot change ownership of %s to %s",zFN, zOwner); |
| 774 | } |
| 775 | if( zOwner!=zUsr ){ |
| 776 | fossil_free((char*)zUsr); |
| 777 | } |
| 778 | } |
| 779 | |
| 780 | |
| 781 | /* |
| 782 | ** Delete a file. |
| 783 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -730,23 +730,26 @@ | |
| 730 | |
| 731 | /* |
| 732 | ** Change access permissions on a file. |
| 733 | */ |
| 734 | void file_set_mode(const char *zFN, int fd, const char *zMode, int bNoErr){ |
| 735 | #if !defined(_WIN32) |
| 736 | mode_t m; |
| 737 | char *zEnd = 0; |
| 738 | m = strtol(zMode, &zEnd, 0); |
| 739 | if( (zEnd[0] || fchmod(fd, m)) && !bNoErr ){ |
| 740 | fossil_fatal("cannot change permissions on %s to \"%s\"", |
| 741 | zFN, zMode); |
| 742 | } |
| 743 | #endif |
| 744 | } |
| 745 | |
| 746 | /* Change the owner of a file to zOwner. zOwner can be of the form |
| 747 | ** USER:GROUP. |
| 748 | */ |
| 749 | void file_set_owner(const char *zFN, int fd, const char *zOwner){ |
| 750 | #if !defined(_WIN32) |
| 751 | const char *zGrp; |
| 752 | const char *zUsr = zOwner; |
| 753 | struct passwd *pw; |
| 754 | struct group *grp; |
| 755 | uid_t uid = -1; |
| @@ -773,10 +776,11 @@ | |
| 776 | fossil_fatal("cannot change ownership of %s to %s",zFN, zOwner); |
| 777 | } |
| 778 | if( zOwner!=zUsr ){ |
| 779 | fossil_free((char*)zUsr); |
| 780 | } |
| 781 | #endif |
| 782 | } |
| 783 | |
| 784 | |
| 785 | /* |
| 786 | ** Delete a file. |
| 787 |