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

« back to all changes in this revision

Viewing changes to src/sysdep.h

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2005-06-26 16:46:25 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050626164625-jjcde8hyztx7xq7o
Tags: 1.10-2
* wget-fix_error--save-headers patch from upstream
  (closes: Bug#314728)
* don't pattern-match server redirects patch from upstream
  (closes: Bug#163243)
* correct de.po typos
  (closes: Bug#313883)
* wget-E_html_behind_file_counting fix problem with adding the
  numbers after the html extension
* updated Standards-Version: to 3.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
#endif
109
109
#endif
110
110
 
111
 
#ifdef __BEOS__
112
 
# undef READ
113
 
# undef WRITE
114
 
# define READ(fd, buf, cnt) recv((fd), (buf), (cnt), 0)
115
 
# define WRITE(fd, buf, cnt) send((fd), (buf), (cnt), 0)
116
 
#endif
117
 
 
118
 
/* mswindows.h defines these.  */
119
 
#ifndef READ
120
 
# define READ(fd, buf, cnt) read ((fd), (buf), (cnt))
121
 
#endif
122
 
#ifndef WRITE
123
 
# define WRITE(fd, buf, cnt) write ((fd), (buf), (cnt))
124
 
#endif
125
 
#ifndef REALCLOSE
126
 
# define REALCLOSE(x) close (x)
127
 
#endif
128
 
 
129
 
#define CLOSE(x)                                \
130
 
do {                                            \
131
 
  REALCLOSE (x);                                \
132
 
  DEBUGP (("Closing fd %d\n", x));              \
133
 
} while (0)
134
 
 
135
111
/* Define a large integral type useful for storing large sizes that
136
112
   exceed sizes of one download, such as when printing the sum of all
137
113
   downloads.  Note that this has nothing to do with large file
138
 
   support, yet.
 
114
   support, which determines the wgint type.  This should be as large
 
115
   as possible even on systems where when wgint is 32-bit; also,
 
116
   unlike wgint, this can be a floating point type.
139
117
 
140
118
   We use a 64-bit integral type where available, `double' otherwise.
141
119
   It's hard to print LARGE_INT's portably, but fortunately it's
151
129
typedef long long LARGE_INT;
152
130
#  define LARGE_INT_FMT "%lld"
153
131
# else
 
132
#  if _MSC_VER
 
133
/* Use __int64 under Windows. */
 
134
typedef __int64 LARGE_INT;
 
135
#   define LARGE_INT_FMT "%I64"
 
136
#  else
154
137
/* Large integer type unavailable; use `double' instead.  */
155
138
typedef double LARGE_INT;
156
 
#  define LARGE_INT_FMT "%.0f"
 
139
#   define LARGE_INT_FMT "%.0f"
 
140
#  endif
157
141
# endif
158
142
#endif
159
143
 
 
144
/* Under Windows we #define struct_stat to struct _stati64. */
 
145
#ifndef struct_stat
 
146
# define struct_stat struct stat
 
147
#endif
 
148
 
 
149
#ifdef HAVE_LIMITS_H
 
150
# include <limits.h>
 
151
#endif
 
152
 
 
153
#ifndef CHAR_BIT
 
154
# define CHAR_BIT 8
 
155
#endif
 
156
 
 
157
#ifndef LONG_MAX
 
158
# define LONG_MAX ((long) ~((unsigned long)1 << (CHAR_BIT * sizeof (long) - 1)))
 
159
#endif
 
160
#ifndef LLONG_MAX
 
161
# define LLONG_MAX ((long long) ~((unsigned long long)1 << (CHAR_BIT * sizeof (long long) - 1)))
 
162
#endif
 
163
 
160
164
/* These are defined in cmpt.c if missing, therefore it's generally
161
165
   safe to declare their parameters.  */
162
166
#ifndef HAVE_STRERROR
180
184
#ifndef HAVE_VSNPRINTF
181
185
int vsnprintf ();
182
186
#endif
183
 
#ifndef HAVE_USLEEP
184
 
int usleep PARAMS ((unsigned long));
185
 
#endif
186
187
#ifndef HAVE_MEMMOVE
187
188
void *memmove ();
188
189
#endif
231
232
# ifdef solaris
232
233
#  define SYSTEM_FNMATCH
233
234
# endif
234
 
#endif /* HAVE_FNMATCH_H */
 
235
#endif /* HAVE_WORKING_FNMATCH_H */
235
236
 
236
237
#ifdef SYSTEM_FNMATCH
237
238
# include <fnmatch.h>
252
253
int fnmatch ();
253
254
#endif
254
255
 
 
256
/* Provide sig_atomic_t if the system doesn't.  */
 
257
#ifndef HAVE_SIG_ATOMIC_T
 
258
typedef int sig_atomic_t;
 
259
#endif
 
260
 
255
261
/* Provide uint32_t on the platforms that don't define it.  Although
256
262
   most code should be agnostic about integer sizes, some code really
257
263
   does need a 32-bit integral type.  Such code should use uint32_t.