Re: apr_realpath

2001-03-15 Thread Brian Havard
On Wed, 14 Mar 2001 09:38:21 -0600, William A. Rowe, Jr. wrote:

[...]

Canonicalizing first to the truename is required before apr_filepath_common 
can be
trusted on Win32 or OS2, since c:/thislongname/ is also c:/THISLO~1/

Actually OS/2 does NOT have the long/short name crap that windows does.

-- 
 __
 |  Brian Havard |  He is not the messiah!   |
 |  [EMAIL PROTECTED]  |  He's a very naughty boy! - Life of Brian |
 --



Re: apr_realpath

2001-03-15 Thread Kevin Pilch-Bisson
On Wed, Mar 14, 2001 at 03:29:49PM -0600, William A. Rowe, Jr. wrote:
 From: Kevin Pilch-Bisson [EMAIL PROTECTED]
 Sent: Wednesday, March 14, 2001 3:08 PM
 
 
Would there be a way to convert an incomplete path to a complete path?
(change drive to c:, getpwd, append foo, in the above example)
   
   That is what apr_filepath_merge does for you.  You can pass a partial 
   root [/ or d:]
   apr_filepath_root over to apr_filepath_merge as the addpath (with a null 
   root).  That
   will return a true root.  apr_filepath_root is as much to help 
   apr_filepath_merge
   (and any other app) break apart the root from a name, since the root is 
   very platform
   specific (moreso than any other part of this debate.)  Look at netware 
   machine/sys:/
   versus win32/os2, toss in unc names and unix remote volumes and ugh, what 
   a mess.
   
  I believe you, I am just a little confused as to the process.  Say I do
  the following:
  
  C:\mywork\subversion\  svn commit C:foo
  
  which eventually reaches the following code.
  
  char added_path[][] = { C:foo, NULL };
  (or should this be { C:, foo, NULL }; ?)
  char *newpath;
  apr_filepath_merge(newpath, NULL, added_path, APR_FILEPATH_TRUEPATH, p);
  
  What do I get back from apr_filepath_merge?  Or more to the point, how
  can I get C:\mywork\subversion\foo as newpath?
 
 Simply, rootpath == NULL uses CWD, therefore c:\mywork\subversion.
 
 
 char *newpath = foo
 char **addpath = newpath
 char **newpath;
 
 apr_filepath_merge(newpath, NULL, addpath, APR_FILEPATH_TRUEPATH, p);
 
 If foo exists, newpath == c:\mywork\subversion\foo, and addpath += 4
 (points to the trailing NULL of the string you passed).
 
 If foo is not found, newpath == c:\mywork\subversion\ and addpath didn't
 change (the path wasn't found.
 
 If you pass foo/bar as addpath, and foo exists, then .../foo/ is retured
 for newpath, and addpath += 4 (pointing at bar) if bar was not found.
 
 Of course, without APR_FILEPATH_TRUEPATH, the whole thing just returns, and
 doesn't care if the path names are real.  With APR_FILEPATH_TRUECASE, those
 parts that exist are returned with the correct case followed by the remaining
 given path, since it also doesn't care if the files exist, only that the
 names that exist are the proper case.  Both of these would set point addpath
 to it's own trailing NULL.
 
 The Q. remains, do we want char** addpath, or simply a char* with no feedback
 of existing v.s. nonexisting path components?
 
 Bill
 
 
Right.  Now say the target was D:foo, but my current drive was C:, as in
D:\mywork\subversion C:
C:\Program Files\Subversion svn commit D:foo

How do I find out that D:foo is really D:\mywork\subversion\foo?

On another note, I thought of another root case to be handled under
UNIX.  Cygwin with windows drives.  I.e. / is %SYSDRIVE%:\, but //c/ is
C:\ and //d/ is D:\.  The double slashes are important to cygwin.

What a PITA.  Sometimes I don't know whether I am glad for cygwin
because it makes having to use 'Doze at work less annoying, or pissed of
because of the hassle it makes for real unix development!
-- 
~
Kevin Pilch-Bissonhttp://www.pilch-bisson.net
 Historically speaking, the presences of wheels in Unix
 has never precluded their reinvention. - Larry Wall
~


Re: apr_realpath

2001-03-15 Thread William A. Rowe, Jr.
From: Brian Havard [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 7:39 PM


 On Wed, 14 Mar 2001 09:38:21 -0600, William A. Rowe, Jr. wrote:
 
 [...]
 
 Canonicalizing first to the truename is required before apr_filepath_common 
 can be
 trusted on Win32 or OS2, since c:/thislongname/ is also c:/THISLO~1/
 
 Actually OS/2 does NOT have the long/short name crap that windows does.

Good point.  Quick question ... it does have case insensitivty and drive/path 
(with
current paths of each drive, correct?)  And it does or doesn't have unc 
notation 
(sorry, I know you have answered that before, I get lost :-?)

Bill





Re: apr_realpath

2001-03-15 Thread Brian Havard
On Wed, 14 Mar 2001 21:08:01 -0600, William A. Rowe, Jr. wrote:

From: Brian Havard [EMAIL PROTECTED]
Sent: Wednesday, March 14, 2001 7:39 PM

 Actually OS/2 does NOT have the long/short name crap that windows does.

Good point.  Quick question ... it does have case insensitivty and drive/path 
(with
current paths of each drive, correct?)  And it does or doesn't have unc 
notation 
(sorry, I know you have answered that before, I get lost :-?)

Yes, all that's the same as Win32 along with trailing . and space
truncation.

-- 
 __
 |  Brian Havard |  He is not the messiah!   |
 |  [EMAIL PROTECTED]  |  He's a very naughty boy! - Life of Brian |
 --



Re: builconf APR and httpd2.0

2001-03-15 Thread jean-frederic clere
Hi Ryan,

I have fixed it - It works on my Linux Box -

Find enclosed the patch for httpd-2.0

Cheers

Jean-frederic

[EMAIL PROTECTED] wrote:
 
 This is most definately a bug.  APR should have a copy of the libtool
 files, and ANY APR application should just use those files.  There is no
 reason for httpd-2.0 to create links anyplace, it should just use APR's
 version.
 
 Ryan
 
 On Wed, 14 Mar 2001, jean-frederic clere wrote:
 
  Hi,
 
  I have noted that buildconf of httpd2.0 creates links for the libtool
  needed elements and the APR one copies them in the build subdirectory:
  +++
  $ ls -lt
  srclib/apr/build/ltconfig
  -rwxr-xr-x   1 VTX3 Spain  97913 Mar 14 16:26
  srclib/apr/build/ltconfig
  $ ls -l
  ltconfig
  lrwxrwxrwx   1 VTX3 Spain 33 Mar 14 16:33 ltconfig -
  /usr/local/share/libtool/ltconfig
  $
  +++
 
  Is this a bug or a Feature?
 
  Cheers
 
  Jean-frederic
 
 
 
 ___
 Ryan Bloom  [EMAIL PROTECTED]
 406 29th St.
 San Francisco, CA 94131
 ---Index: configure.in
===
RCS file: /home/cvs/apache/httpd-2.0/configure.in,v
retrieving revision 1.130
diff -u -r1.130 configure.in
--- configure.in2001/03/11 23:40:47 1.130
+++ configure.in2001/03/15 16:21:03
@@ -4,7 +4,7 @@
 AC_INIT(acinclude.m4)
 
 AC_CONFIG_HEADER(include/ap_config_auto.h)
-AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_AUX_DIR(srclib/apr/build)
  
 dnl ## This is the central place where Apache's version should be kept.
 dnl AM_INIT_AUTOMAKE(apache, 2.0-dev)
@@ -20,6 +20,7 @@
 dnl Absolute source/build directory
 abs_srcdir=`(cd $srcdir  pwd)`
 abs_builddir=`pwd`
+aprbuild=$abs_srcdir/srclib/apr/build
 
 MKDIR=$abs_srcdir/srclib/apr/build/mkdir.sh
 
@@ -155,7 +156,7 @@
 APACHE_LIBTOOL_SILENT
 
 if test $apache_need_shared = yes; then
-  $SHELL $srcdir/ltconfig --output=shlibtool --disable-static --srcdir=$srcdir 
--cache-file=./config.cache $srcdir/ltmain.sh
+  $SHELL $aprbuild/ltconfig --output=shlibtool --disable-static 
--srcdir=$srcdir --cache-file=./config.cache $aprbuild/ltmain.sh
   case $PLATFORM in
 *os390)
   CFLAGS=$CFLAGS -Wc,DLL,EXPORTALL
Index: build/build2.mk
===
RCS file: /home/cvs/apache/httpd-2.0/build/build2.mk,v
retrieving revision 1.30
diff -u -r1.30 build2.mk
--- build/build2.mk 2001/02/27 01:39:25 1.30
+++ build/build2.mk 2001/03/15 16:21:03
@@ -58,15 +58,13 @@
 
 TOUCH_FILES = mkinstalldirs install-sh missing
 
-LT_TARGETS = ltconfig ltmain.sh config.guess config.sub
-
 config_h_in = include/ap_config_auto.h.in
 apr_configure = srclib/apr/configure
 mm_configure = srclib/apr/shmem/unix/mm/configure
 pcre_configure = srclib/pcre/configure
 aprutil_configure = srclib/apr-util/configure
 
-APACHE_TARGETS = $(TOUCH_FILES) $(LT_TARGETS) configure $(config_h_in)
+APACHE_TARGETS = $(TOUCH_FILES) configure $(config_h_in)
 
 APR_TARGETS = $(apr_configure) $(mm_configure) $(aprutil_configure)
 
@@ -88,9 +86,6 @@
@echo dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf $@
@echo dnl edits here will be lost $@
@cat acinclude.m4 $(libtool_m4)  $@
-
-$(LT_TARGETS):
-   libtoolize $(AMFLAGS) --force
 
 $(config_h_in): configure
 # explicitly remove target since autoheader does not seem to work 
Index: build/rules.mk
===
RCS file: /home/cvs/apache/httpd-2.0/build/rules.mk,v
retrieving revision 1.43
diff -u -r1.43 rules.mk
--- build/rules.mk  2001/02/26 04:38:18 1.43
+++ build/rules.mk  2001/03/15 16:21:03
@@ -188,7 +188,7 @@
rm -rf .libs
 
 distclean: distclean-recursive clean-x
-   rm -f config.cache config.log config.status config_vars.mk libtool \
+   rm -f config.cache config.log config.status config_vars.mk \
stamp-h Makefile shlibtool .deps $(DISTCLEAN_TARGETS)
 
 include $(builddir)/.deps


Problem Build Latest Win32 CVS Release

2001-03-15 Thread Ian Holsman
Hi.
I'm trying to build the latest APR CVS release using the .dsw supplied 
in Apache.

I've run into the problem where it couldn't find apr_inet_pton.
I can't just include the file, as it uses EAFNOSUPPORT which isn't defined
in Win32.
I think this is a pretty recent change, due to the Win32 file trying 
include ../unix/sa_common.c

Cheers
Ian


Re: Problem Build Latest Win32 CVS Release

2001-03-15 Thread Jeff Trawick
Ian Holsman [EMAIL PROTECTED] writes:

 Hi.
 I'm trying to build the latest APR CVS release using the .dsw supplied
 in Apache.
 
 I've run into the problem where it couldn't find apr_inet_pton.
 I can't just include the file, as it uses EAFNOSUPPORT which isn't defined
 in Win32.
 
 I think this is a pretty recent change, due to the Win32 file trying
 include ../unix/sa_common.c

I guess I'm the problem... I didn't realize that we didn't build
inet_pton on Win32.

Can you try this?  Hopefully I'll get a chance to play with it later.

Thanks (and sorry!),

Jeff

Index: apr.dsp
===
RCS file: /home/cvspublic/apr/apr.dsp,v
retrieving revision 1.66
diff -u -r1.66 apr.dsp
--- apr.dsp 2001/02/03 16:31:07 1.66
+++ apr.dsp 2001/03/15 23:32:36
@@ -267,6 +267,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\network_io\unix\inet_pton.c
+# End Source File
+# Begin Source File
+
 SOURCE=.\include\arch\win32\networkio.h
 # End Source File
 # Begin Source File
Index: network_io/unix/inet_pton.c
===
RCS file: /home/cvspublic/apr/network_io/unix/inet_pton.c,v
retrieving revision 1.4
diff -u -r1.4 inet_pton.c
--- network_io/unix/inet_pton.c 2001/03/07 17:41:37 1.4
+++ network_io/unix/inet_pton.c 2001/03/15 23:32:40
@@ -48,6 +48,10 @@
 #define __P(x) x
 #endif
 
+#if !defined(EAFNOSUPPORT)  defined(WSAEAFNOSUPPORT)
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
+
 /*
  * WARNING: Don't even consider trying to compile this on a system where
  * sizeof(int)  4.  sizeof(int)  4 is fine; all the world's not a VAX.
 

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
   http://www.geocities.com/SiliconValley/Park/9289/
 Born in Roswell... married an alien...