~ubuntu-branches/ubuntu/natty/curl/natty-security

« back to all changes in this revision

Viewing changes to lib/version.c

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2010-06-20 13:56:28 UTC
  • mfrom: (3.4.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100620135628-e30tp9jldq6hq985
Tags: 7.21.0-1ubuntu1
* Merge from debian unstable.  Remaining changes: LP: #596334
  - Keep build deps in main:
    - Drop build dependencies: stunnel, libssh2-1-dev
    - Add build-dependency on openssh-server
    - Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: version.c,v 1.61 2009-06-10 02:49:43 yangtse Exp $
22
21
 ***************************************************************************/
23
22
 
24
23
#include "setup.h"
45
44
#include <iconv.h>
46
45
#endif
47
46
 
 
47
#ifdef USE_LIBRTMP
 
48
#include <librtmp/rtmp.h>
 
49
#endif
 
50
 
48
51
#ifdef USE_LIBSSH2
49
52
#include <libssh2.h>
50
53
#endif
112
115
  left -= len;
113
116
  ptr += len;
114
117
#endif
 
118
#ifdef USE_LIBRTMP
 
119
  {
 
120
    char suff[2];
 
121
    if (RTMP_LIB_VERSION & 0xff) {
 
122
      suff[0] = (RTMP_LIB_VERSION & 0xff) + 'a' - 1;
 
123
      suff[1] = '\0';
 
124
    } else {
 
125
      suff[0] = '\0';
 
126
    }
 
127
    len = snprintf(ptr, left, " librtmp/%d.%d%s",
 
128
      RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
 
129
/*
 
130
  If another lib version is added below this one, this code would
 
131
  also have to do:
 
132
 
 
133
    left -= len;
 
134
    ptr += len;
 
135
*/
 
136
  }
 
137
#endif
115
138
 
116
139
  return version;
117
140
}
118
141
 
119
 
/* data for curl_version_info */
 
142
/* data for curl_version_info
 
143
 
 
144
   Keep the list sorted alphabetically. It is also written so that each
 
145
   protocol line has its own #if line to make things easier on the eye.
 
146
 */
120
147
 
121
148
static const char * const protocols[] = {
122
 
#ifndef CURL_DISABLE_TFTP
123
 
  "tftp",
124
 
#endif
125
 
#ifndef CURL_DISABLE_FTP
126
 
  "ftp",
127
 
#endif
128
 
#ifndef CURL_DISABLE_TELNET
129
 
  "telnet",
130
 
#endif
131
149
#ifndef CURL_DISABLE_DICT
132
150
  "dict",
133
151
#endif
 
152
#ifndef CURL_DISABLE_FILE
 
153
  "file",
 
154
#endif
 
155
#ifndef CURL_DISABLE_FTP
 
156
  "ftp",
 
157
#endif
 
158
#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)
 
159
  "ftps",
 
160
#endif
 
161
#ifndef CURL_DISABLE_HTTP
 
162
  "http",
 
163
#endif
 
164
#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)
 
165
  "https",
 
166
#endif
 
167
#ifndef CURL_DISABLE_IMAP
 
168
  "imap",
 
169
#endif
 
170
#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)
 
171
  "imaps",
 
172
#endif
134
173
#ifndef CURL_DISABLE_LDAP
135
174
  "ldap",
136
 
#ifdef HAVE_LDAP_SSL
 
175
#if (defined(USE_OPENLDAP) && defined(USE_SSL)) || \
 
176
   (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL))
137
177
  "ldaps",
138
178
#endif
139
179
#endif
140
 
#ifndef CURL_DISABLE_HTTP
141
 
  "http",
142
 
#endif
143
 
#ifndef CURL_DISABLE_FILE
144
 
  "file",
145
 
#endif
146
 
 
147
 
#ifdef USE_SSL
148
 
#ifndef CURL_DISABLE_HTTP
149
 
  "https",
150
 
#endif
151
 
#ifndef CURL_DISABLE_FTP
152
 
  "ftps",
153
 
#endif
154
 
#endif
155
 
 
 
180
#ifndef CURL_DISABLE_POP3
 
181
  "pop3",
 
182
#endif
 
183
#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)
 
184
  "pop3s",
 
185
#endif
 
186
#ifdef USE_LIBRTMP
 
187
  "rtmp",
 
188
#endif
 
189
#ifndef CURL_DISABLE_RTSP
 
190
  "rtsp",
 
191
#endif
156
192
#ifdef USE_LIBSSH2
157
193
  "scp",
 
194
#endif
 
195
#ifdef USE_LIBSSH2
158
196
  "sftp",
159
197
#endif
 
198
#ifndef CURL_DISABLE_SMTP
 
199
  "smtp",
 
200
#endif
 
201
#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)
 
202
  "smtps",
 
203
#endif
 
204
#ifndef CURL_DISABLE_TELNET
 
205
  "telnet",
 
206
#endif
 
207
#ifndef CURL_DISABLE_TFTP
 
208
  "tftp",
 
209
#endif
160
210
 
161
211
  NULL
162
212
};
194
244
#ifdef CURLDEBUG
195
245
  | CURL_VERSION_CURLDEBUG
196
246
#endif
197
 
#ifdef USE_ARES
 
247
#ifdef CURLRES_ASYNCH
198
248
  | CURL_VERSION_ASYNCHDNS
199
249
#endif
200
250
#ifdef HAVE_SPNEGO