Changeset 1076


Ignore:
Timestamp:
Sep 21, 2006, 9:54:54 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Support for platforms without <getopt.h> in TOIlet.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/toilet.c

    r1075 r1076  
    4848    unsigned flag_gay = 0;
    4949
     50#if defined(HAVE_GETOPT_H)
    5051    for(;;)
    5152    {
    52 #ifdef HAVE_GETOPT_LONG
    53 #   define MOREINFO "Try `%s --help' for more information.\n"
     53#   ifdef HAVE_GETOPT_LONG
     54#       define MOREINFO "Try `%s --help' for more information.\n"
    5455        int option_index = 0;
    5556        static struct option long_options[] =
     
    6364
    6465        int c = getopt_long(argc, argv, "ghv", long_options, &option_index);
    65 #else
    66 #   define MOREINFO "Try `%s -h' for more information.\n"
     66#   else
     67#       define MOREINFO "Try `%s -h' for more information.\n"
    6768        int c = getopt(argc, argv, "ghv");
    68 #endif
     69#   endif
    6970        if(c == -1)
    7071            break;
     
    101102        }
    102103    }
     104#else
     105#   define MOREINFO "Usage: %s message...\n"
     106    int optind = 1;
     107#endif
    103108
    104109    if(optind >= argc)
Note: See TracChangeset for help on using the changeset viewer.