]> git.pld-linux.org Git - packages/apr.git/blob - apr-0.9.4_0.9.5.patch
- fixed dirs in -devel; release 0.2
[packages/apr.git] / apr-0.9.4_0.9.5.patch
1 diff -urN apr-0.9.4.org/build/make_exports.awk apr/build/make_exports.awk
2 --- apr-0.9.4.org/build/make_exports.awk        2003-11-14 15:29:26.000000000 +0100
3 +++ apr/build/make_exports.awk  2003-09-26 09:25:59.000000000 +0200
4 @@ -76,8 +76,8 @@
5      }
6  }
7  
8 -/^[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
9 -    sub("[ \t]*AP[RU]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
10 +/^[ \t]*AP[RUI]?_(CORE_)?DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
11 +    sub("[ \t]*AP[RUI]?_(CORE_)?DECLARE[^(]*[(][^)]*[)][ \t]*", "")
12      sub("[(].*", "")
13      sub("([^ ]* (^([ \t]*[(])))+", "")
14  
15 diff -urN apr-0.9.4.org/build/make_nw_export.awk apr/build/make_nw_export.awk
16 --- apr-0.9.4.org/build/make_nw_export.awk      2003-11-14 15:29:26.000000000 +0100
17 +++ apr/build/make_nw_export.awk        2003-09-26 09:25:59.000000000 +0200
18 @@ -23,8 +23,8 @@
19         }
20  }
21  
22 -/^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
23 -    sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
24 +/^[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
25 +    sub("[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
26      sub("[(].*", "")
27      sub("([^ ]* (^([ \t]*[(])))+", "")
28  
29 @@ -65,7 +65,7 @@
30      next
31  }
32  
33 -/^[ \t]*AP[RU]?_DECLARE_DATA .*;$/ {
34 +/^[ \t]*AP[RUI]?_DECLARE_DATA .*;$/ {
35         varname = $NF;
36         gsub( /[*;]/, "", varname);
37         gsub( /\[.*\]/, "", varname);
38 diff -urN apr-0.9.4.org/build/make_var_export.awk apr/build/make_var_export.awk
39 --- apr-0.9.4.org/build/make_var_export.awk     2003-11-14 15:29:26.000000000 +0100
40 +++ apr/build/make_var_export.awk       2003-09-26 09:25:59.000000000 +0200
41 @@ -1,7 +1,7 @@
42  # Based on apr's make_export.awk, which is
43  # based on Ryan Bloom's make_export.pl
44  
45 -/^#[ \t]*if(def)? (AP[RU]?_|!?defined).*/ {
46 +/^#[ \t]*if(def)? (AP[RUI]?_|!?defined).*/ {
47         if (old_filename != FILENAME) {
48                 if (old_filename != "") printf("%s", line)
49                 macro_no = 0
50 @@ -47,7 +47,7 @@
51         }
52  }
53  
54 -/^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ {
55 +/^[ \t]*(extern[ \t]+)?AP[RUI]?_DECLARE_DATA .*;$/ {
56         varname = $NF;
57         gsub( /[*;]/, "", varname);
58         gsub( /\[.*\]/, "", varname);
59 diff -urN apr-0.9.4.org/CHANGES apr/CHANGES
60 --- apr-0.9.4.org/CHANGES       2003-11-14 15:29:26.000000000 +0100
61 +++ apr/CHANGES 2003-10-24 18:35:15.000000000 +0200
62 @@ -1,3 +1,10 @@
63 +Changes with APR 0.9.5
64 +
65 +  *) Add apr_os_pipe_put_ex(), which allows the caller to tell APR
66 +     to establish a cleanup on the pipe.  [Jeff Trawick, Brad Nicholes]
67 +
68 +  *) Fix make_exports.awk to work with apr-iconv.  [Justin Erenkrantz]
69 +
70  Changes with APR 0.9.4
71  
72    *) win32: fix apr_file_dup() and apr_file_dup2() to dup the
73 diff -urN apr-0.9.4.org/configure.in apr/configure.in
74 --- apr-0.9.4.org/configure.in  2003-11-14 15:29:26.000000000 +0100
75 +++ apr/configure.in    2003-10-17 00:13:01.000000000 +0200
76 @@ -938,6 +938,7 @@
77      netinet/sctp.h      \
78      netinet/sctp_uio.h  \
79      sys/file.h         \
80 +    sys/ioctl.h         \
81      sys/mman.h         \
82      sys/poll.h         \
83      sys/resource.h     \
84 @@ -946,6 +947,7 @@
85      sys/sendfile.h     \
86      sys/signal.h       \
87      sys/socket.h       \
88 +    sys/sockio.h       \
89      sys/stat.h          \
90      sys/sysctl.h       \
91      sys/syslimits.h    \
92 @@ -992,9 +994,11 @@
93  AC_SUBST(stdlibh)
94  AC_SUBST(stringh)
95  AC_SUBST(stringsh)
96 +AC_SUBST(sys_ioctlh)
97  AC_SUBST(sys_sendfileh)
98  AC_SUBST(sys_signalh)
99  AC_SUBST(sys_socketh)
100 +AC_SUBST(sys_sockioh)
101  AC_SUBST(sys_typesh)
102  AC_SUBST(sys_timeh)
103  AC_SUBST(sys_uioh)
104 diff -urN apr-0.9.4.org/file_io/netware/pipe.c apr/file_io/netware/pipe.c
105 --- apr-0.9.4.org/file_io/netware/pipe.c        2003-11-14 15:29:26.000000000 +0100
106 +++ apr/file_io/netware/pipe.c  2003-10-24 18:35:15.000000000 +0200
107 @@ -136,9 +136,10 @@
108      return APR_EINVAL;
109  }
110  
111 -APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
112 -                                          apr_os_file_t *thefile,
113 -                                          apr_pool_t *pool)
114 +APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
115 +                                             apr_os_file_t *thefile,
116 +                                             int register_cleanup,
117 +                                             apr_pool_t *pool)
118  {
119      int *dafile = thefile;
120      
121 @@ -150,14 +151,28 @@
122      (*file)->timeout = -1;
123      (*file)->ungetchar = -1; /* no char avail */
124      (*file)->filedes = *dafile;
125 -    (*file)->flags = APR_FILE_NOCLEANUP;
126 +    if (!register_cleanup) {
127 +        (*file)->flags = APR_FILE_NOCLEANUP;
128 +    }
129      (*file)->buffered = 0;
130  #if APR_HAS_THREADS
131      (*file)->thlock = NULL;
132  #endif
133 +    if (register_cleanup) {
134 +        apr_pool_cleanup_register((*file)->pool, (void *)(*file),
135 +                                  apr_unix_file_cleanup,
136 +                                  apr_pool_cleanup_null);
137 +    }
138      return APR_SUCCESS;
139  }
140  
141 +APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
142 +                                          apr_os_file_t *thefile,
143 +                                          apr_pool_t *pool)
144 +{
145 +    return apr_os_pipe_put_ex(file, thefile, 0, pool);
146 +}
147 +
148  APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
149  {
150         int             filedes[2];
151 diff -urN apr-0.9.4.org/file_io/os2/pipe.c apr/file_io/os2/pipe.c
152 --- apr-0.9.4.org/file_io/os2/pipe.c    2003-11-14 15:29:26.000000000 +0100
153 +++ apr/file_io/os2/pipe.c      2003-10-24 18:35:15.000000000 +0200
154 @@ -184,9 +184,10 @@
155  
156  
157  
158 -APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
159 -                                          apr_os_file_t *thefile,
160 -                                          apr_pool_t *pool)
161 +APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
162 +                                             apr_os_file_t *thefile,
163 +                                             int register_cleanup,
164 +                                             apr_pool_t *pool)
165  {
166      (*file) = apr_pcalloc(pool, sizeof(apr_file_t));
167      (*file)->pool = pool;
168 @@ -196,5 +197,19 @@
169      (*file)->timeout = -1;
170      (*file)->filedes = *thefile;
171  
172 +    if (register_cleanup) {
173 +        apr_pool_cleanup_register(pool, *file, apr_file_cleanup,
174 +                                  apr_pool_cleanup_null);
175 +    }
176 +
177      return APR_SUCCESS;
178  }
179 +
180 +
181 +
182 +APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
183 +                                          apr_os_file_t *thefile,
184 +                                          apr_pool_t *pool)
185 +{
186 +    return apr_os_pipe_put_ex(file, thefile, 0, pool);
187 +}
188 diff -urN apr-0.9.4.org/file_io/unix/pipe.c apr/file_io/unix/pipe.c
189 --- apr-0.9.4.org/file_io/unix/pipe.c   2003-11-14 15:29:26.000000000 +0100
190 +++ apr/file_io/unix/pipe.c     2003-10-24 18:35:16.000000000 +0200
191 @@ -171,9 +171,10 @@
192      return APR_EINVAL;
193  }
194  
195 -APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
196 -                                          apr_os_file_t *thefile,
197 -                                          apr_pool_t *pool)
198 +APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
199 +                                             apr_os_file_t *thefile,
200 +                                             int register_cleanup,
201 +                                             apr_pool_t *pool)
202  {
203      int *dafile = thefile;
204      
205 @@ -185,14 +186,28 @@
206      (*file)->timeout = -1;
207      (*file)->ungetchar = -1; /* no char avail */
208      (*file)->filedes = *dafile;
209 -    (*file)->flags = APR_FILE_NOCLEANUP;
210 +    if (!register_cleanup) {
211 +        (*file)->flags = APR_FILE_NOCLEANUP;
212 +    }
213      (*file)->buffered = 0;
214  #if APR_HAS_THREADS
215      (*file)->thlock = NULL;
216  #endif
217 +    if (register_cleanup) {
218 +        apr_pool_cleanup_register((*file)->pool, (void *)(*file),
219 +                                  apr_unix_file_cleanup,
220 +                                  apr_pool_cleanup_null);
221 +    }
222      return APR_SUCCESS;
223  }
224  
225 +APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
226 +                                          apr_os_file_t *thefile,
227 +                                          apr_pool_t *pool)
228 +{
229 +    return apr_os_pipe_put_ex(file, thefile, 0, pool);
230 +}
231 +
232  APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
233  {
234      int filedes[2];
235 diff -urN apr-0.9.4.org/include/apr.h.in apr/include/apr.h.in
236 --- apr-0.9.4.org/include/apr.h.in      2003-11-14 15:29:26.000000000 +0100
237 +++ apr/include/apr.h.in        2003-10-17 00:13:02.000000000 +0200
238 @@ -127,9 +127,11 @@
239  #define APR_HAVE_STDLIB_H        @stdlibh@
240  #define APR_HAVE_STRING_H        @stringh@
241  #define APR_HAVE_STRINGS_H       @stringsh@
242 +#define APR_HAVE_SYS_IOCTL_H     @sys_ioctlh@
243  #define APR_HAVE_SYS_SENDFILE_H  @sys_sendfileh@
244  #define APR_HAVE_SYS_SIGNAL_H    @sys_signalh@
245  #define APR_HAVE_SYS_SOCKET_H    @sys_socketh@
246 +#define APR_HAVE_SYS_SOCKIO_H    @sys_sockioh@
247  #define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@
248  #define APR_HAVE_SYS_TIME_H      @sys_timeh@
249  #define APR_HAVE_SYS_TYPES_H     @sys_typesh@
250 diff -urN apr-0.9.4.org/include/apr.hnw apr/include/apr.hnw
251 --- apr-0.9.4.org/include/apr.hnw       2003-11-14 15:29:26.000000000 +0100
252 +++ apr/include/apr.hnw 2003-10-17 00:13:02.000000000 +0200
253 @@ -143,6 +143,7 @@
254  #define APR_HAVE_SYS_SENDFILE_H 0
255  #define APR_HAVE_SYS_SIGNAL_H   0
256  #define APR_HAVE_SYS_SOCKET_H   0
257 +#define APR_HAVE_SYS_SOCKIO_H   0
258  #define APR_HAVE_SYS_SYSLIMITS_H 0
259  #define APR_HAVE_SYS_TIME_H     0
260  #define APR_HAVE_SYS_TYPES_H    1
261 diff -urN apr-0.9.4.org/include/apr.hw apr/include/apr.hw
262 --- apr-0.9.4.org/include/apr.hw        2003-11-14 15:29:26.000000000 +0100
263 +++ apr/include/apr.hw  2003-10-17 00:13:02.000000000 +0200
264 @@ -171,6 +171,7 @@
265  #define APR_HAVE_SYS_SENDFILE_H 0
266  #define APR_HAVE_SYS_SIGNAL_H   0
267  #define APR_HAVE_SYS_SOCKET_H   0
268 +#define APR_HAVE_SYS_SOCKIO_H   0
269  #define APR_HAVE_SYS_SYSLIMITS_H 0
270  #define APR_HAVE_SYS_TIME_H     0
271  #define APR_HAVE_SYS_TYPES_H    1
272 diff -urN apr-0.9.4.org/include/apr_network_io.h apr/include/apr_network_io.h
273 --- apr-0.9.4.org/include/apr_network_io.h      2003-11-14 15:29:26.000000000 +0100
274 +++ apr/include/apr_network_io.h        2003-10-17 00:13:02.000000000 +0200
275 @@ -721,6 +721,15 @@
276                                                   apr_interval_time_t *t);
277  
278  /**
279 + * Query the specified socket if at the OOB/Urgent data mark
280 + * @param sock The socket to query
281 + * @param atmark Is set to true if socket is at the OOB/urgent mark,
282 + *               otherwise is set to false.
283 + */
284 +APR_DECLARE(apr_status_t) apr_socket_atmark(apr_socket_t *sock, 
285 +                                            int *atmark);
286 +
287 +/**
288   * Return an apr_sockaddr_t from an apr_socket_t
289   * @param sa The returned apr_sockaddr_t.
290   * @param which Which interface do we want the apr_sockaddr_t for?
291 diff -urN apr-0.9.4.org/include/apr_pools.h apr/include/apr_pools.h
292 --- apr-0.9.4.org/include/apr_pools.h   2003-11-14 15:29:26.000000000 +0100
293 +++ apr/include/apr_pools.h     2003-09-26 21:12:32.000000000 +0200
294 @@ -481,10 +481,12 @@
295   *
296   *      Users of APR must take EXTREME care when choosing a key to
297   *      use for their data.  It is possible to accidentally overwrite
298 - *      data by choosing a key that another part of the program is using
299 - *      It is advised that steps are taken to ensure that a unique
300 - *      key is used at all times.
301 - * @bug Specify how to ensure this uniqueness!
302 + *      data by choosing a key that another part of the program is using.
303 + *      Therefore it is advised that steps are taken to ensure that unique
304 + *      keys are used for all of the userdata objects in a particular pool
305 + *      (the same key in two different pools or a pool and one of its
306 + *      subpools is okay) at all times.  Careful namespace prefixing of
307 + *      key names is a typical way to help ensure this uniqueness.
308   */
309  APR_DECLARE(apr_status_t) apr_pool_userdata_set(
310      const void *data,
311 diff -urN apr-0.9.4.org/include/apr_portable.h apr/include/apr_portable.h
312 --- apr-0.9.4.org/include/apr_portable.h        2003-11-14 15:29:26.000000000 +0100
313 +++ apr/include/apr_portable.h  2003-10-24 18:35:16.000000000 +0200
314 @@ -391,6 +391,21 @@
315                                            apr_pool_t *cont);
316  
317  /**
318 + * convert the file from os specific type to apr type.
319 + * @param file The apr file we are converting to.
320 + * @param thefile The os specific pipe to convert
321 + * @param register_cleanup A cleanup will be registered on the apr_file_t
322 + *   to issue apr_file_close().
323 + * @param cont The pool to use if it is needed.
324 + * @remark On Unix, it is only possible to put a file descriptor into
325 + *         an apr file type.
326 + */
327 +APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
328 +                                             apr_os_file_t *thefile,
329 +                                             int register_cleanup,
330 +                                             apr_pool_t *cont);
331 +
332 +/**
333   * convert the dir from os specific type to apr type.
334   * @param dir The apr dir we are converting to.
335   * @param thedir The os specific dir to convert
336 diff -urN apr-0.9.4.org/include/apr_version.h apr/include/apr_version.h
337 --- apr-0.9.4.org/include/apr_version.h 2003-11-14 15:29:26.000000000 +0100
338 +++ apr/include/apr_version.h   2003-09-26 07:27:22.000000000 +0200
339 @@ -99,14 +99,14 @@
340  #define APR_MINOR_VERSION       9
341  
342  /** patch level */
343 -#define APR_PATCH_VERSION       4
344 +#define APR_PATCH_VERSION       5
345  
346  
347  /** 
348   *  This symbol is defined for internal, "development" copies of APR. This
349   *  symbol will be #undef'd for releases. 
350   */
351 -/* #undef APR_IS_DEV_VERSION */
352 +#define APR_IS_DEV_VERSION
353  
354  /** The formatted string of APR's version */
355  #define APR_VERSION_STRING \
356 diff -urN apr-0.9.4.org/include/arch/netware/apr_arch_file_io.h apr/include/arch/netware/apr_arch_file_io.h
357 --- apr-0.9.4.org/include/arch/netware/apr_arch_file_io.h       2003-11-14 15:29:26.000000000 +0100
358 +++ apr/include/arch/netware/apr_arch_file_io.h 2003-10-02 16:49:33.000000000 +0200
359 @@ -147,8 +147,6 @@
360      NXPathCtx_t pathCtx;
361  };
362  
363 -extern apr_int32_t CpuCurrentProcessor; /* system variable */
364 -
365  #define MAX_SERVER_NAME     64
366  #define MAX_VOLUME_NAME     64
367  #define MAX_PATH_NAME       256
368 diff -urN apr-0.9.4.org/include/arch/unix/apr_arch_networkio.h apr/include/arch/unix/apr_arch_networkio.h
369 --- apr-0.9.4.org/include/arch/unix/apr_arch_networkio.h        2003-11-14 15:29:26.000000000 +0100
370 +++ apr/include/arch/unix/apr_arch_networkio.h  2003-10-17 00:13:02.000000000 +0200
371 @@ -102,6 +102,9 @@
372  #if APR_HAVE_SYS_SOCKET_H
373  #include <sys/socket.h>
374  #endif
375 +#if APR_HAVE_SYS_SOCKIO_H
376 +#include <sys/sockio.h>
377 +#endif
378  #if APR_HAVE_NETDB_H
379  #include <netdb.h>
380  #endif
381 @@ -111,6 +114,9 @@
382  #if APR_HAVE_SYS_SENDFILE_H
383  #include <sys/sendfile.h>
384  #endif
385 +#if APR_HAVE_SYS_IOCTL_H
386 +#include <sys/ioctl.h>
387 +#endif
388  /* End System Headers */
389  
390  #ifndef HAVE_POLLIN
391 diff -urN apr-0.9.4.org/include/arch/unix/apr_private.h.in apr/include/arch/unix/apr_private.h.in
392 --- apr-0.9.4.org/include/arch/unix/apr_private.h.in    2003-11-14 15:29:26.000000000 +0100
393 +++ apr/include/arch/unix/apr_private.h.in      2003-10-24 19:50:58.000000000 +0200
394 @@ -100,10 +100,6 @@
395  /* Define to 1 if you have the <ctype.h> header file. */
396  #undef HAVE_CTYPE_H
397  
398 -/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
399 -   don't. */
400 -#undef HAVE_DECL_SYS_SIGLIST
401 -
402  /* Define to 1 if you have the <dirent.h> header file. */
403  #undef HAVE_DIRENT_H
404  
405 @@ -461,6 +457,9 @@
406  /* Define to 1 if you have the <sys/file.h> header file. */
407  #undef HAVE_SYS_FILE_H
408  
409 +/* Define to 1 if you have the <sys/ioctl.h> header file. */
410 +#undef HAVE_SYS_IOCTL_H
411 +
412  /* Define to 1 if you have the <sys/ipc.h> header file. */
413  #undef HAVE_SYS_IPC_H
414  
415 @@ -494,6 +493,9 @@
416  /* Define to 1 if you have the <sys/socket.h> header file. */
417  #undef HAVE_SYS_SOCKET_H
418  
419 +/* Define to 1 if you have the <sys/sockio.h> header file. */
420 +#undef HAVE_SYS_SOCKIO_H
421 +
422  /* Define to 1 if you have the <sys/stat.h> header file. */
423  #undef HAVE_SYS_STAT_H
424  
425 @@ -644,6 +646,9 @@
426  /* Define if SysV semaphores affect threads within the process */
427  #undef SYSVSEM_IS_GLOBAL
428  
429 +/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
430 +#undef SYS_SIGLIST_DECLARED
431 +
432  /* Define if APR supports threads */
433  #undef USE_THREADS
434  
435 diff -urN apr-0.9.4.org/memory/unix/apr_pools.c apr/memory/unix/apr_pools.c
436 --- apr-0.9.4.org/memory/unix/apr_pools.c       2003-11-14 15:29:26.000000000 +0100
437 +++ apr/memory/unix/apr_pools.c 2003-09-28 19:14:21.000000000 +0200
438 @@ -55,6 +55,7 @@
439  #include "apr.h"
440  #include "apr_private.h"
441  
442 +#include "apr_atomic.h"
443  #include "apr_portable.h" /* for get_os_proc */
444  #include "apr_strings.h"
445  #include "apr_general.h"
446 @@ -555,6 +556,13 @@
447  
448      apr_pool_tag(global_pool, "apr_global_pool");
449  
450 +    /* This has to happen here because mutexes might be backed by
451 +     * atomics.  It used to be snug and safe in apr_initialize().
452 +     */
453 +    if ((rv = apr_atomic_init(global_pool)) != APR_SUCCESS) {
454 +        return rv;
455 +    }
456 +
457  #if APR_HAS_THREADS
458      {
459          apr_thread_mutex_t *mutex;
460 @@ -1266,6 +1274,13 @@
461  
462      apr_pools_initialized = 1;
463  
464 +    /* This has to happen here because mutexes might be backed by
465 +     * atomics.  It used to be snug and safe in apr_initialize().
466 +     */
467 +    if ((rv = apr_atomic_init(global_pool)) != APR_SUCCESS) {
468 +        return rv;
469 +    }
470 +
471  #if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
472      apr_file_open_stderr(&file_stderr, global_pool);
473      if (file_stderr) {
474 diff -urN apr-0.9.4.org/misc/netware/aprlib.def apr/misc/netware/aprlib.def
475 --- apr-0.9.4.org/misc/netware/aprlib.def       2003-11-14 15:29:26.000000000 +0100
476 +++ apr/misc/netware/aprlib.def 2003-10-02 16:49:33.000000000 +0200
477 @@ -1,4 +1,3 @@
478  MODULE  LIBC.NLM
479  MODULE  WS2_32.NLM
480 -IMPORT  CpuCurrentProcessor
481  EXPORT @aprlib.imp
482 diff -urN apr-0.9.4.org/misc/unix/start.c apr/misc/unix/start.c
483 --- apr-0.9.4.org/misc/unix/start.c     2003-11-14 15:29:26.000000000 +0100
484 +++ apr/misc/unix/start.c       2003-09-28 01:58:23.000000000 +0200
485 @@ -99,9 +99,12 @@
486  
487      apr_pool_tag(pool, "apr_initialize");
488  
489 -    if ((status = apr_atomic_init(pool)) != APR_SUCCESS) {
490 -        return status;
491 -    }
492 +    /* apr_atomic_init() used to be called from here aswell.
493 +     * Pools rely on mutexes though, which can be backed by
494 +     * atomics.  Due to this circular dependency
495 +     * apr_pool_initialize() is taking care of calling
496 +     * apr_atomic_init() at the correct time.
497 +     */
498  
499      apr_signal_init(pool);
500  
501 diff -urN apr-0.9.4.org/network_io/os2/sockopt.c apr/network_io/os2/sockopt.c
502 --- apr-0.9.4.org/network_io/os2/sockopt.c      2003-11-14 15:29:26.000000000 +0100
503 +++ apr/network_io/os2/sockopt.c        2003-10-17 00:13:02.000000000 +0200
504 @@ -170,6 +170,20 @@
505  }
506                                             
507  
508 +APR_DECLARE(apr_status_t) apr_socket_atmark(apr_socket_t *sock, int *atmark)
509 +{
510 +    int oobmark;
511 +
512 +    if (ioctl(sock->socketdes, SIOCATMARK, (void*)&oobmark, sizeof(oobmark)) < 0) {
513 +        return APR_OS2_STATUS(sock_errno());
514 +    }
515 +
516 +    *atmark = (oobmark != 0);
517 +
518 +    return APR_SUCCESS;
519 +}
520 +
521 +
522  APR_DECLARE(apr_status_t) apr_gethostname(char *buf, apr_int32_t len, 
523                                            apr_pool_t *cont)
524  {
525 diff -urN apr-0.9.4.org/network_io/unix/sockaddr.c apr/network_io/unix/sockaddr.c
526 --- apr-0.9.4.org/network_io/unix/sockaddr.c    2003-11-14 15:29:26.000000000 +0100
527 +++ apr/network_io/unix/sockaddr.c      2003-09-29 21:08:15.000000000 +0200
528 @@ -374,14 +374,6 @@
529      memset(&hints, 0, sizeof(hints));
530      hints.ai_family = family;
531      hints.ai_socktype = SOCK_STREAM;
532 -#ifdef AI_ADDRCONFIG
533 -    if (family == AF_UNSPEC) {
534 -        /* By default, only look up addresses using address types for
535 -         * which a local interface is configured, i.e. no IPv6 if no
536 -         * IPv6 interfaces configured. */
537 -        hints.ai_flags = AI_ADDRCONFIG;
538 -    }
539 -#endif
540      if(hostname == NULL) {
541  #ifdef AI_PASSIVE 
542          /* If hostname is NULL, assume we are trying to bind to all
543 @@ -404,13 +396,6 @@
544          servname = apr_itoa(p, port);
545      }
546      error = getaddrinfo(hostname, servname, &hints, &ai_list);
547 -#ifdef AI_ADDRCONFIG
548 -    if (error == EAI_BADFLAGS && family == AF_UNSPEC) {
549 -        /* Retry with no flags if AI_ADDRCONFIG was rejected. */
550 -        hints.ai_flags = 0;
551 -        error = getaddrinfo(hostname, servname, &hints, &ai_list);
552 -    }
553 -#endif
554      if (error) {
555  #ifndef WIN32
556          if (error == EAI_SYSTEM) {
557 diff -urN apr-0.9.4.org/network_io/unix/sockopt.c apr/network_io/unix/sockopt.c
558 --- apr-0.9.4.org/network_io/unix/sockopt.c     2003-11-14 15:29:26.000000000 +0100
559 +++ apr/network_io/unix/sockopt.c       2003-10-17 00:13:02.000000000 +0200
560 @@ -55,6 +55,7 @@
561  #include "apr_arch_networkio.h"
562  #include "apr_strings.h"
563  
564 +
565  static apr_status_t soblock(int sd)
566  {
567  /* BeOS uses setsockopt at present for non blocking... */
568 @@ -369,6 +370,27 @@
569  }
570  
571  
572 +apr_status_t apr_socket_atmark(apr_socket_t *sock, int *atmark)
573 +{
574 +/* In 1.0 we rely on compile failure to assure all platforms grabbed
575 + * the correct header file support for SIOCATMARK, but we don't want 
576 + * to fail the build of 0.9.  Keep things good for the released branch.
577 + */
578 +#ifdef SIOCATMARK
579 +    int oobmark;
580 +
581 +    if (ioctl(sock->socketdes, SIOCATMARK, (void*) &oobmark) < 0)
582 +        return apr_get_netos_error();
583 +
584 +    *atmark = (oobmark != 0);
585 +
586 +    return APR_SUCCESS;
587 +#else
588 +    return APR_ENOTIMPL;
589 +#endif
590 +}
591 +
592 +
593  /* deprecated */
594  apr_status_t apr_setsocketopt(apr_socket_t *sock,
595                                apr_int32_t opt, apr_int32_t on)
596 diff -urN apr-0.9.4.org/network_io/win32/sockopt.c apr/network_io/win32/sockopt.c
597 --- apr-0.9.4.org/network_io/win32/sockopt.c    2003-11-14 15:29:26.000000000 +0100
598 +++ apr/network_io/win32/sockopt.c      2003-10-17 00:13:03.000000000 +0200
599 @@ -276,6 +276,19 @@
600  }
601                                             
602  
603 +APR_DECLARE(apr_status_t) apr_socket_atmark(apr_socket_t *sock, int *atmark)
604 +{
605 +    u_long oobmark;
606 +
607 +    if (ioctlsocket(sock->socketdes, SIOCATMARK, (void*) &oobmark) < 0)
608 +        return apr_get_netos_error();
609 +
610 +    *atmark = (oobmark != 0);
611 +
612 +    return APR_SUCCESS;
613 +}
614 +
615 +
616  APR_DECLARE(apr_status_t) apr_gethostname(char *buf, int len,
617                                            apr_pool_t *cont)
618  {
619 diff -urN apr-0.9.4.org/NWGNUmakefile apr/NWGNUmakefile
620 --- apr-0.9.4.org/NWGNUmakefile 2003-11-14 15:29:26.000000000 +0100
621 +++ apr/NWGNUmakefile   2003-10-02 16:49:33.000000000 +0200
622 @@ -221,7 +221,6 @@
623         @libc.imp \
624         @ws2nlm.imp \
625         @netware.imp \
626 -       CpuCurrentProcessor \
627         $(EOLIST)
628   
629  #   
630
This page took 0.128852 seconds and 3 git commands to generate.