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 Jun 15, 2020
1 parent fcf0868 commit c01cac7
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

#define BUF_SIZE 2048 // Seems to be a decent start to cover most stdin files

Expand Down Expand Up @@ -160,6 +162,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) * BUF_SIZE);
if(plist_entire == NULL)
Expand Down Expand Up @@ -203,6 +206,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 c01cac7

Please sign in to comment.