~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to lib/strings.in.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A substitute <strings.h>.
2
 
 
3
 
   Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
4
 
 
5
 
   This program is free software; you can redistribute it and/or modify
6
 
   it under the terms of the GNU General Public License as published by
7
 
   the Free Software Foundation; either version 3, or (at your option)
8
 
   any later version.
9
 
 
10
 
   This program is distributed in the hope that it will be useful,
11
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
   GNU General Public License for more details.
14
 
 
15
 
   You should have received a copy of the GNU General Public License
16
 
   along with this program; if not, write to the Free Software Foundation,
17
 
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
18
 
 
19
 
#ifndef _GL_STRINGS_H
20
 
 
21
 
#if __GNUC__ >= 3
22
 
@PRAGMA_SYSTEM_HEADER@
23
 
#endif
24
 
 
25
 
/* The include_next requires a split double-inclusion guard.  */
26
 
#@INCLUDE_NEXT@ @NEXT_STRINGS_H@
27
 
 
28
 
#ifndef _GL_STRINGS_H
29
 
#define _GL_STRINGS_H
30
 
 
31
 
 
32
 
/* The definition of GL_LINK_WARNING is copied here.  */
33
 
 
34
 
 
35
 
#ifdef __cplusplus
36
 
extern "C" {
37
 
#endif
38
 
 
39
 
 
40
 
/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
41
 
   greater than zero if S1 is lexicographically less than, equal to or greater
42
 
   than S2.
43
 
   Note: This function does not work in multibyte locales.  */
44
 
#if ! @HAVE_STRCASECMP@
45
 
extern int strcasecmp (char const *s1, char const *s2);
46
 
#endif
47
 
#if defined GNULIB_POSIXCHECK
48
 
/* strcasecmp() does not work with multibyte strings:
49
 
   POSIX says that it operates on "strings", and "string" in POSIX is defined
50
 
   as a sequence of bytes, not of characters.   */
51
 
# undef strcasecmp
52
 
# define strcasecmp(a,b) \
53
 
    (GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \
54
 
                      "in multibyte locales - " \
55
 
                      "use mbscasecmp if you care about " \
56
 
                      "internationalization, or use c_strcasecmp (from " \
57
 
                      "gnulib module c-strcase) if you want a locale " \
58
 
                      "independent function"), \
59
 
     strcasecmp (a, b))
60
 
#endif
61
 
 
62
 
/* Compare no more than N bytes of strings S1 and S2, ignoring case,
63
 
   returning less than, equal to or greater than zero if S1 is
64
 
   lexicographically less than, equal to or greater than S2.
65
 
   Note: This function cannot work correctly in multibyte locales.  */
66
 
#if ! @HAVE_DECL_STRNCASECMP@
67
 
extern int strncasecmp (char const *s1, char const *s2, size_t n);
68
 
#endif
69
 
#if defined GNULIB_POSIXCHECK
70
 
/* strncasecmp() does not work with multibyte strings:
71
 
   POSIX says that it operates on "strings", and "string" in POSIX is defined
72
 
   as a sequence of bytes, not of characters.  */
73
 
# undef strncasecmp
74
 
# define strncasecmp(a,b,n) \
75
 
    (GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \
76
 
                      "strings in multibyte locales - " \
77
 
                      "use mbsncasecmp or mbspcasecmp if you care about " \
78
 
                      "internationalization, or use c_strncasecmp (from " \
79
 
                      "gnulib module c-strcase) if you want a locale " \
80
 
                      "independent function"), \
81
 
     strncasecmp (a, b, n))
82
 
#endif
83
 
 
84
 
 
85
 
#ifdef __cplusplus
86
 
}
87
 
#endif
88
 
 
89
 
#endif /* _GL_STRING_H */
90
 
#endif /* _GL_STRING_H */