diff options
Diffstat (limited to 'src/fs/gnunet-helper-fs-publish.c')
-rw-r--r-- | src/fs/gnunet-helper-fs-publish.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c index db74e65aa..a6776d84f 100644 --- a/src/fs/gnunet-helper-fs-publish.c +++ b/src/fs/gnunet-helper-fs-publish.c | |||
@@ -434,7 +434,6 @@ extract_files(struct ScanTreeNode *item) | |||
434 | } | 434 | } |
435 | 435 | ||
436 | 436 | ||
437 | #ifndef WINDOWS | ||
438 | /** | 437 | /** |
439 | * Install a signal handler to ignore SIGPIPE. | 438 | * Install a signal handler to ignore SIGPIPE. |
440 | */ | 439 | */ |
@@ -479,8 +478,6 @@ make_dev_zero(int fd, int flags) | |||
479 | GNUNET_assert(0 == close(z)); | 478 | GNUNET_assert(0 == close(z)); |
480 | } | 479 | } |
481 | 480 | ||
482 | #endif | ||
483 | |||
484 | 481 | ||
485 | /** | 482 | /** |
486 | * Main function of the helper process to extract meta data. | 483 | * Main function of the helper process to extract meta data. |
@@ -499,23 +496,12 @@ main(int argc, char *const *argv) | |||
499 | const char *ex; | 496 | const char *ex; |
500 | struct ScanTreeNode *root; | 497 | struct ScanTreeNode *root; |
501 | 498 | ||
502 | #if WINDOWS | ||
503 | /* We're using stdout to communicate binary data back to the parent; use | ||
504 | * binary mode. | ||
505 | */ | ||
506 | _setmode(1, _O_BINARY); | ||
507 | /* Get utf-8-encoded arguments */ | ||
508 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args(argc, argv, &argc, &argv)) | ||
509 | return 5; | ||
510 | output_stream = 1; /* stdout */ | ||
511 | #else | ||
512 | ignore_sigpipe(); | 499 | ignore_sigpipe(); |
513 | /* move stdout to some other FD for IPC, bind | 500 | /* move stdout to some other FD for IPC, bind |
514 | stdout/stderr to /dev/null */ | 501 | stdout/stderr to /dev/null */ |
515 | output_stream = dup(1); | 502 | output_stream = dup(1); |
516 | make_dev_zero(1, O_WRONLY); | 503 | make_dev_zero(1, O_WRONLY); |
517 | make_dev_zero(2, O_WRONLY); | 504 | make_dev_zero(2, O_WRONLY); |
518 | #endif | ||
519 | 505 | ||
520 | /* parse command line */ | 506 | /* parse command line */ |
521 | if ((3 != argc) && (2 != argc)) | 507 | if ((3 != argc) && (2 != argc)) |
@@ -523,9 +509,6 @@ main(int argc, char *const *argv) | |||
523 | fprintf(stderr, | 509 | fprintf(stderr, |
524 | "%s", | 510 | "%s", |
525 | "gnunet-helper-fs-publish needs exactly one or two arguments\n"); | 511 | "gnunet-helper-fs-publish needs exactly one or two arguments\n"); |
526 | #if WINDOWS | ||
527 | GNUNET_free((void *)argv); | ||
528 | #endif | ||
529 | return 1; | 512 | return 1; |
530 | } | 513 | } |
531 | filename_expanded = argv[1]; | 514 | filename_expanded = argv[1]; |
@@ -548,9 +531,6 @@ main(int argc, char *const *argv) | |||
548 | #if HAVE_LIBEXTRACTOR | 531 | #if HAVE_LIBEXTRACTOR |
549 | EXTRACTOR_plugin_remove_all(plugins); | 532 | EXTRACTOR_plugin_remove_all(plugins); |
550 | #endif | 533 | #endif |
551 | #if WINDOWS | ||
552 | GNUNET_free((void *)argv); | ||
553 | #endif | ||
554 | return 2; | 534 | return 2; |
555 | } | 535 | } |
556 | /* signal that we're done counting files, so that a percentage of | 536 | /* signal that we're done counting files, so that a percentage of |
@@ -563,9 +543,6 @@ main(int argc, char *const *argv) | |||
563 | #if HAVE_LIBEXTRACTOR | 543 | #if HAVE_LIBEXTRACTOR |
564 | EXTRACTOR_plugin_remove_all(plugins); | 544 | EXTRACTOR_plugin_remove_all(plugins); |
565 | #endif | 545 | #endif |
566 | #if WINDOWS | ||
567 | GNUNET_free((void *)argv); | ||
568 | #endif | ||
569 | return 3; | 546 | return 3; |
570 | } | 547 | } |
571 | if (NULL != root) | 548 | if (NULL != root) |
@@ -579,9 +556,6 @@ main(int argc, char *const *argv) | |||
579 | #if HAVE_LIBEXTRACTOR | 556 | #if HAVE_LIBEXTRACTOR |
580 | EXTRACTOR_plugin_remove_all(plugins); | 557 | EXTRACTOR_plugin_remove_all(plugins); |
581 | #endif | 558 | #endif |
582 | #if WINDOWS | ||
583 | GNUNET_free((void *)argv); | ||
584 | #endif | ||
585 | return 4; | 559 | return 4; |
586 | } | 560 | } |
587 | free_tree(root); | 561 | free_tree(root); |
@@ -593,9 +567,6 @@ main(int argc, char *const *argv) | |||
593 | #if HAVE_LIBEXTRACTOR | 567 | #if HAVE_LIBEXTRACTOR |
594 | EXTRACTOR_plugin_remove_all(plugins); | 568 | EXTRACTOR_plugin_remove_all(plugins); |
595 | #endif | 569 | #endif |
596 | #if WINDOWS | ||
597 | GNUNET_free((void *)argv); | ||
598 | #endif | ||
599 | return 0; | 570 | return 0; |
600 | } | 571 | } |
601 | 572 | ||