|
|
Choosing A Webhost: |
Re: cvs commit: apr/network_io/win32 sockopt.c: msg#00037apache.apr.devel
At 05:13 PM 10/16/2003, wrowe@xxxxxxxxxx wrote: >wrowe 2003/10/16 15:13:03 > > Modified: . Tag: APR_0_9_BRANCH configure.in > include Tag: APR_0_9_BRANCH apr.h.in apr.hnw apr.hw > apr_network_io.h > include/arch/unix Tag: APR_0_9_BRANCH apr_arch_networkio.h > network_io/os2 Tag: APR_0_9_BRANCH sockopt.c > network_io/unix Tag: APR_0_9_BRANCH sockopt.c > network_io/win32 Tag: APR_0_9_BRANCH sockopt.c > Log: > Introduce apr_socket_atmark() with a more friendly failure case when the > SIOCATMARK symbol isn't available, to avoid breaking APR 0.9/httpd 2.0 > distributions. [William Rowe, Jim Jagielski, Brian Havard and Jeff > Trawick] > > RCS file: /home/cvs/apr/network_io/unix/sockopt.c,v > retrieving revision 1.70 > retrieving revision 1.70.2.1 > diff -u -r1.70 -r1.70.2.1 > --- sockopt.c 30 May 2003 12:50:40 -0000 1.70 > +++ sockopt.c 16 Oct 2003 22:13:02 -0000 1.70.2.1 > @@ -55,6 +55,7 @@ > #include "apr_arch_networkio.h" > #include "apr_strings.h" > > + > static apr_status_t soblock(int sd) > { > /* BeOS uses setsockopt at present for non blocking... */ > @@ -366,6 +367,27 @@ > *on = apr_is_option_set(sock->netmask, opt); > } > return APR_SUCCESS; > +} > + > + > +apr_status_t apr_socket_atmark(apr_socket_t *sock, int *atmark) > +{ > +/* In 1.0 we rely on compile failure to assure all platforms grabbed > + * the correct header file support for SIOCATMARK, but we don't want > + * to fail the build of 0.9. Keep things good for the released branch. > + */ > +#ifdef SIOCATMARK > + int oobmark; > + > + if (ioctl(sock->socketdes, SIOCATMARK, (void*) &oobmark) < 0) > + return apr_get_netos_error(); > + > + *atmark = (oobmark != 0); > + > + return APR_SUCCESS; > +#else > + return APR_ENOTIMPL; > +#endif > } Hopefully this provide the behavior you desired, Jeff. Thanks to yourself, Brian and Jim for all the efforts. Bill
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [patch] proc_mutex_flock_child_init() should close the file, Jeff Trawick |
|---|---|
| Next by Date: | Re: cvs commit: apr/network_io/win32 sockopt.c, Jeff Trawick |
| Previous by Thread: | [patch 0.9] apr_socket_atmark() proposed for backport, William A. Rowe, Jr. |
| Next by Thread: | Re: cvs commit: apr/network_io/win32 sockopt.c, Jeff Trawick |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |