Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
plistutil: Don't support reading from stdin on Windows for now
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik committed Feb 22, 2021
1 parent fe6d2d9 commit 8bb8b24
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/plistutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#ifndef _MSC_VER
#include <unistd.h>
#endif

#ifdef _MSC_VER
#pragma warning(disable:4996)
Expand Down Expand Up @@ -158,6 +160,7 @@ int main(int argc, char *argv[])

if (!options->in_file || !strcmp(options->in_file, "-"))
{
#ifndef _MSC_VER
read_size = 0;
plist_entire = malloc(sizeof(char) * read_capacity);
if(plist_entire == NULL)
Expand Down Expand Up @@ -213,6 +216,10 @@ int main(int argc, char *argv[])
free(options);
return 1;
}
#else
printf("ERROR: reading from stdin is not supported on Windows");
return -1;
#endif
}
else
{
Expand Down

0 comments on commit 8bb8b24

Please sign in to comment.