You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jon Travis <jt...@covalent.net> on 2000/04/01 01:08:41 UTC

PATCH: Small APR cleanups

I've written some small cleanups into APR -- mostly argument
checking, and some questions about some of the code:

file_io/unix/dir.c:
  Do we really need ap_{put,get}_os_dir and ap_get_os_dir?
  I can't find that these are used anywhere, and in
  reality these kinds of things shouldn't be exported.
  ** Update: RBB noted to me that these were here for good
                      reason (PHP, etc)

  Why do we occasionally return APR_ENOSTAT when stat()
  fails, and othertimes we return errno?  errno could
  give us some pretty useful information.

file_io/unix/filedup.c:
  I get the feeling that ap_dup_file() is more broken
  than originally apparent to me, but before submitting
  patches, I'd like someone with some free time to take
  a quick glance.

file_io/open.c:
  I am dubious of ap_ferror() returning -1.  In addition
  the ap_{put,get}_os_file seem a bit strange to me, as
  the whole point of APR is to get away from these
  platform dependencies.  I haven't investigated the
  usage of these functions much yet, but methinks there
  should be a better way.. ;-)

file_io/readwrite.c:
  ap_ungetc() currently doesn't know what to do with a
  regular file descriptor.  Perhaps we could store that
  information, after every read into the the structure, I.e
   fake it the same way that buffered FILE * calls do.

Here is the patch -- just piddly stuff.
Commit or reject as needed. ;-)

-- Jon



Re: PATCH: Small APR cleanups

Posted by rb...@apache.org.
> Here is the patch -- just piddly stuff.
> Commit or reject as needed. ;-)

I'm going through this now.  I'll post my thougts, and then commit the
changes.  On the whole, this is a good patch, there are a few things I
disagree with, but those will be obvious when I post my comments.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------