1
0

patch-pppd_options_c 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. --- ppp-2.4.5.orig/pppd/options.c 2009-11-16 23:26:07.000000000 +0100
  2. +++ ppp-2.4.5/pppd/options.c 2014-03-17 16:13:14.000000000 +0100
  3. @@ -76,7 +76,7 @@
  4. #include "pathnames.h"
  5. #if defined(ultrix) || defined(NeXT)
  6. -char *strdup __P((char *));
  7. +char *strdup (char *);
  8. #endif
  9. static const char rcsid[] = RCSID;
  10. @@ -147,30 +147,30 @@ static char logfile_name[MAXPATHLEN]; /*
  11. /*
  12. * Prototypes
  13. */
  14. -static int setdomain __P((char **));
  15. -static int readfile __P((char **));
  16. -static int callfile __P((char **));
  17. -static int showversion __P((char **));
  18. -static int showhelp __P((char **));
  19. -static void usage __P((void));
  20. -static int setlogfile __P((char **));
  21. +static int setdomain (char **);
  22. +static int readfile (char **);
  23. +static int callfile (char **);
  24. +static int showversion (char **);
  25. +static int showhelp (char **);
  26. +static void usage (void);
  27. +static int setlogfile (char **);
  28. #ifdef PLUGIN
  29. -static int loadplugin __P((char **));
  30. +static int loadplugin (char **);
  31. #endif
  32. #ifdef PPP_FILTER
  33. -static int setpassfilter __P((char **));
  34. -static int setactivefilter __P((char **));
  35. +static int setpassfilter (char **);
  36. +static int setactivefilter (char **);
  37. #endif
  38. #ifdef MAXOCTETS
  39. -static int setmodir __P((char **));
  40. +static int setmodir (char **);
  41. #endif
  42. -static option_t *find_option __P((const char *name));
  43. -static int process_option __P((option_t *, char *, char **));
  44. -static int n_arguments __P((option_t *));
  45. -static int number_option __P((char *, u_int32_t *, int));
  46. +static option_t *find_option (const char *name);
  47. +static int process_option (option_t *, char *, char **);
  48. +static int n_arguments (option_t *);
  49. +static int number_option (char *, u_int32_t *, int);
  50. /*
  51. * Structure to store extra lists of options.
  52. @@ -577,13 +577,13 @@ match_option(name, opt, dowild)
  53. option_t *opt;
  54. int dowild;
  55. {
  56. - int (*match) __P((char *, char **, int));
  57. + int (*match) (char *, char **, int);
  58. if (dowild != (opt->type == o_wild))
  59. return 0;
  60. if (!dowild)
  61. return strcmp(name, opt->name) == 0;
  62. - match = (int (*) __P((char *, char **, int))) opt->addr;
  63. + match = (int (*) (char *, char **, int)) opt->addr;
  64. return (*match)(name, NULL, 0);
  65. }
  66. @@ -635,8 +635,8 @@ process_option(opt, cmd, argv)
  67. u_int32_t v;
  68. int iv, a;
  69. char *sv;
  70. - int (*parser) __P((char **));
  71. - int (*wildp) __P((char *, char **, int));
  72. + int (*parser) (char **);
  73. + int (*wildp) (char *, char **, int);
  74. char *optopt = (opt->type == o_wild)? "": " option";
  75. int prio = option_priority;
  76. option_t *mainopt = opt;
  77. @@ -767,7 +767,7 @@ process_option(opt, cmd, argv)
  78. case o_special_noarg:
  79. case o_special:
  80. - parser = (int (*) __P((char **))) opt->addr;
  81. + parser = (int (*) (char **)) opt->addr;
  82. if (!(*parser)(argv))
  83. return 0;
  84. if (opt->flags & OPT_A2LIST) {
  85. @@ -790,7 +790,7 @@ process_option(opt, cmd, argv)
  86. break;
  87. case o_wild:
  88. - wildp = (int (*) __P((char *, char **, int))) opt->addr;
  89. + wildp = (int (*) (char *, char **, int)) opt->addr;
  90. if (!(*wildp)(cmd, argv, 1))
  91. return 0;
  92. break;
  93. @@ -881,7 +881,7 @@ check_options()
  94. static void
  95. print_option(opt, mainopt, printer, arg)
  96. option_t *opt, *mainopt;
  97. - void (*printer) __P((void *, char *, ...));
  98. + void (*printer) (void *, char *, ...);
  99. void *arg;
  100. {
  101. int i, v;
  102. @@ -944,12 +944,12 @@ print_option(opt, mainopt, printer, arg)
  103. printer(arg, " ");
  104. }
  105. if (opt->flags & OPT_A2PRINTER) {
  106. - void (*oprt) __P((option_t *,
  107. + void (*oprt) (option_t *,
  108. void ((*)__P((void *, char *, ...))),
  109. - void *));
  110. - oprt = (void (*) __P((option_t *,
  111. + void *);
  112. + oprt = (void (*) (option_t *,
  113. void ((*)__P((void *, char *, ...))),
  114. - void *)))opt->addr2;
  115. + void *))opt->addr2;
  116. (*oprt)(opt, printer, arg);
  117. } else if (opt->flags & OPT_A2STRVAL) {
  118. p = (char *) opt->addr2;
  119. @@ -986,7 +986,7 @@ print_option(opt, mainopt, printer, arg)
  120. static void
  121. print_option_list(opt, printer, arg)
  122. option_t *opt;
  123. - void (*printer) __P((void *, char *, ...));
  124. + void (*printer) (void *, char *, ...);
  125. void *arg;
  126. {
  127. while (opt->name != NULL) {
  128. @@ -1004,7 +1004,7 @@ print_option_list(opt, printer, arg)
  129. */
  130. void
  131. print_options(printer, arg)
  132. - void (*printer) __P((void *, char *, ...));
  133. + void (*printer) (void *, char *, ...);
  134. void *arg;
  135. {
  136. struct option_list *list;
  137. @@ -1576,7 +1576,7 @@ loadplugin(argv)
  138. char *arg = *argv;
  139. void *handle;
  140. const char *err;
  141. - void (*init) __P((void));
  142. + void (*init) (void);
  143. char *path = arg;
  144. const char *vers;