Commit 3654682d authored by Josh Coalson's avatar Josh Coalson
Browse files

fixes for MSVC

parent ac1e70aa
......@@ -12,6 +12,7 @@ C_FILES= \
analyze.c \
decode.c \
encode.c \
file.c \
main.c
OBJS= $(C_FILES:.c=.obj)
......
......@@ -16,8 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <unistd.h> /* for chown() */
#ifdef _MSC_VER
#include <sys/utime.h> /* for utime() */
#include <io.h> /* for chmod() */
#else
#include <utime.h> /* for utime() */
#include <unistd.h> /* for chown() */
#endif
#include <sys/stat.h> /* for stat() */
#include "file.h"
......@@ -31,7 +36,9 @@ void flac__file_copy_metadata(const char *srcpath, const char *destpath)
srctime.modtime = srcstat.st_mtime;
(void)chmod(destpath, srcstat.st_mode);
(void)utime(destpath, &srctime);
#ifndef _MSC_VER
(void)chown(destpath, srcstat.st_uid, -1);
(void)chown(destpath, -1, srcstat.st_gid);
#endif
}
}
......@@ -21,7 +21,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef _MSC_VER
/* unlink is in stdio.h in VC++ */
#include <unistd.h> /* for unlink() */
#endif
#include "FLAC/all.h"
#include "analyze.h"
#include "decode.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment