httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: OS abstraction
Date Sun, 22 Jun 1997 19:36:10 GMT
On Fri, 20 Jun 1997, Paul Sutton wrote:
> I think it would be nice to remove, as far as possible, the #ifdef __EMX__
> and #ifdef WIN32 sections from the core Apache core. 

Yup I listed that on that "nt todo list" I posted after reviewing the
cleanup.

> os-unix.h
> 
>  #define AP_FILE_CREATE_PERMS \
>               S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
>  #define ap_pipe(fds) pipe(fds)
>  #define ap_is_path_absolute(file) (file && file[0] == '/' ? 1 : 0)
>  #define ap_guess_if_path_is_uri(x) (strchr(x, ':')!= NULL)

I always get concerned about inadvertant use of a param with a side-effect
in a macro ... like what if file there has a side effect.  I'd prefer
this to be one of those cases where we use some of gcc's extensions if
__GNUC__ and otherwise put it in a function.

> Finally I'll enclose a patch which shows how these abstractions make the
> code a bit neater (in my opinion anyway).

+1

Dean


Mime
View raw message