X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Ftests%2Ffilter-cat.c;h=d2b9f5cd08b74feb8a8fbb624524505fdc9ee97a;hb=a688b2a9c0192a8373407fb53636d0e2c6d3ecbd;hp=ff7ddd3c71753ce2ac8d9f8c82089c336f3d3928;hpb=d85b722734a6fcfe94032f6113de9e5c190fd7c3;p=platform%2Fupstream%2Fglib.git diff --git a/gio/tests/filter-cat.c b/gio/tests/filter-cat.c index ff7ddd3..d2b9f5c 100644 --- a/gio/tests/filter-cat.c +++ b/gio/tests/filter-cat.c @@ -23,13 +23,22 @@ #include #include -#include #include #include #include #include +#ifdef G_OS_UNIX +#include +#endif + +#ifdef G_OS_WIN32 +#ifndef STDOUT_FILENO +#define STDOUT_FILENO 1 +#endif +#endif + static gchar **locations = NULL; static char *from_charset = NULL; static char *to_charset = NULL; @@ -157,7 +166,7 @@ cat (GFile * file) g_input_stream_read (in, buffer, sizeof (buffer) - 1, NULL, &error); if (res > 0) { - ssize_t written; + gssize written; p = buffer; while (res > 0) @@ -215,8 +224,6 @@ main (int argc, char *argv[]) GFile *file; int i; - g_type_init (); - context = g_option_context_new ("LOCATION... - concatenate LOCATIONS " "to standard output.");