~ubuntu-branches/ubuntu/saucy/rrdtool/saucy-proposed

« back to all changes in this revision

Viewing changes to src/rrd_getopt1.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2010-07-22 08:07:01 UTC
  • mfrom: (1.2.8 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100722080701-k46mgdfz6euxwqsm
Tags: 1.4.3-1ubuntu1
* Merge from debian unstable, Remaining changes:
  - debian/control: Don't build against ruby1.9 as we don't want
    it in main.
* require libdbi >= 0.8.3 to prevent aborts when using dbi datasources

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
20
   Boston, MA 02111-1307, USA.  */
21
21
 
22
 
#ifndef WIN32
23
 
#if !defined (__STDC__) || !__STDC__
 
22
 
 
23
#if !defined WIN32 && (!defined (__STDC__) || !__STDC__)
24
24
/* This is a separate conditional since some stdc systems
25
25
   reject `defined (const)'.  */
26
26
#ifndef const
27
27
#define const
28
28
#endif
29
29
#endif
30
 
#endif // WIN32
31
30
 
32
31
#ifdef HAVE_CONFIG_H
33
32
#include "../rrd_config.h"
66
65
#define NULL 0
67
66
#endif
68
67
 
69
 
#ifdef WIN32
70
68
int getopt_long(int argc,
71
69
                char** argv,
72
70
                const char* options,
73
71
                const struct option* long_options,
74
72
                int* opt_index)
75
 
#else // WIN32
76
 
int getopt_long(
77
 
    argc,
78
 
    argv,
79
 
    options,
80
 
    long_options,
81
 
    opt_index)
82
 
    int argc;
83
 
    char     *const *argv;
84
 
    const char *options;
85
 
    const struct option *long_options;
86
 
    int      *opt_index;
87
 
#endif // WIN32
88
73
{
89
74
    return _getopt_internal(argc, argv, options, long_options, opt_index, 0);
90
75
}
94
79
   but does match a short option, it is parsed as a short option
95
80
   instead.  */
96
81
 
97
 
#ifdef WIN32
98
82
int getopt_long_only(int argc,
99
83
                     char** argv,
100
84
                     const char* options,
101
85
                     const struct option* long_options,
102
86
                     int* opt_index)
103
 
#else // WIN32
104
 
int getopt_long_only(
105
 
    argc,
106
 
    argv,
107
 
    options,
108
 
    long_options,
109
 
    opt_index)
110
 
    int argc;
111
 
    char     *const *argv;
112
 
    const char *options;
113
 
    const struct option *long_options;
114
 
    int      *opt_index;
115
 
#endif // WIN32
116
87
{
117
88
    return _getopt_internal(argc, argv, options, long_options, opt_index, 1);
118
89
}