Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 71081 invoked from network); 8 Sep 2009 09:03:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Sep 2009 09:03:47 -0000 Received: (qmail 60939 invoked by uid 500); 8 Sep 2009 09:03:47 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 60836 invoked by uid 500); 8 Sep 2009 09:03:47 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 60827 invoked by uid 99); 8 Sep 2009 09:03:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 09:03:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Sep 2009 09:03:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6438223888A2; Tue, 8 Sep 2009 09:03:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r812404 - in /commons/sandbox/runtime/trunk/src/main/native: Makefile.in Makefile.msc.in include/acr.h include/acr_port.h Date: Tue, 08 Sep 2009 09:03:17 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090908090317.6438223888A2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Tue Sep 8 09:03:16 2009 New Revision: 812404 URL: http://svn.apache.org/viewvc?rev=812404&view=rev Log: Add base and dirname function to the port API Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in commons/sandbox/runtime/trunk/src/main/native/include/acr.h commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=812404&r1=812403&r2=812404&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original) +++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Tue Sep 8 09:03:16 2009 @@ -210,6 +210,8 @@ $(SRCDIR)/os/hpux/os.$(OBJ) PPORT_OBJS=\ + $(SRCDIR)/port/basename.$(OBJ) \ + $(SRCDIR)/port/dirname.$(OBJ) \ $(SRCDIR)/port/fnmatch.$(OBJ) \ $(SRCDIR)/port/rijndael.$(OBJ) \ $(SRCDIR)/port/pmatch.$(OBJ) \ Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in?rev=812404&r1=812403&r2=812404&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in (original) +++ commons/sandbox/runtime/trunk/src/main/native/Makefile.msc.in Tue Sep 8 09:03:16 2009 @@ -130,6 +130,8 @@ $(SRCDIR)/os/win32/wusec.$(OBJ) PPORT_OBJS=\ + $(SRCDIR)/port/basename.$(OBJ) \ + $(SRCDIR)/port/dirname.$(OBJ) \ $(SRCDIR)/port/fnmatch.$(OBJ) \ $(SRCDIR)/port/rijndael.$(OBJ) \ $(SRCDIR)/port/pmatch.$(OBJ) \ Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr.h URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr.h?rev=812404&r1=812403&r2=812404&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/include/acr.h (original) +++ commons/sandbox/runtime/trunk/src/main/native/include/acr.h Tue Sep 8 09:03:16 2009 @@ -222,6 +222,7 @@ typedef HANDLE acr_osd_t; #define ACR_INT64_C(val) (val##I64) #define ACR_UINT64_C(val) (val##UI64) +#define ACR_PPATH_MAX 1024 #else /* !_MSC_VER */ typedef ssize_t acr_ssize_t; #ifdef _LP64 /* 64-bit Solaris */ @@ -251,6 +252,7 @@ #define ACR_INT64_C(val) (val##LL) #define ACR_UINT64_C(val) (val##ULL) #endif +#define ACR_PPATH_MAX PATH_MAX #endif /* _MSC_VER */ #if CC_SIZEOF_VOIDP == 8 Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h?rev=812404&r1=812403&r2=812404&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h (original) +++ commons/sandbox/runtime/trunk/src/main/native/include/acr_port.h Tue Sep 8 09:03:16 2009 @@ -43,6 +43,17 @@ * Function prototypes for the portable layer */ +/** + * Reentrant version of dirname. + * If buffer is NULL it uses static buffer. + */ +char *dirname_r(const char *, char *, size_t); +/** + * Reentrant version of basename + * If buffer is NULL it uses static buffer. + */ +char *basename_r(const char *, char *, size_t); + #if defined(ACR_WANT_STRSIGNAL) char *strsignal(int); #endif @@ -65,7 +76,8 @@ * Return 1 on substring match. * Return 0 on no match. * Return -1 on error. - * *estr will point to the end of the longest exact or substring match. + * *estr will point to the end of the longest exact or substring match + * *estr can be NULL if end pointer is not needed. */ #define ACR_PMATCH_NONE 0 #define ACR_PMATCH_SUBSTR 1