You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/09/01 20:57:12 UTC
svn commit: r810168 - in /commons/sandbox/runtime/trunk/src/main/native: ./
include/ include/arch/hpux/ include/arch/linux/ include/arch/solaris/
include/arch/windows/ os/win32/ port/
Author: mturk
Date: Tue Sep 1 18:57:11 2009
New Revision: 810168
URL: http://svn.apache.org/viewvc?rev=810168&view=rev
Log:
Start windows temp files api
Added:
commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c (with props)
commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c (with props)
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_port.h
commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h
commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h
commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
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=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Tue Sep 1 18:57:11 2009
@@ -213,6 +213,8 @@
$(SRCDIR)/port/rijndael.$(OBJ) \
$(SRCDIR)/port/strlcat.$(OBJ) \
$(SRCDIR)/port/strlcpy.$(OBJ) \
+ $(SRCDIR)/port/wcslcat.$(OBJ) \
+ $(SRCDIR)/port/wcslcpy.$(OBJ) \
$(SRCDIR)/port/strsignal.$(OBJ)
BZIP2_OBJS=\
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=810168&r1=810167&r2=810168&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 1 18:57:11 2009
@@ -130,6 +130,8 @@
$(SRCDIR)/port/rijndael.$(OBJ) \
$(SRCDIR)/port/strlcat.$(OBJ) \
$(SRCDIR)/port/strlcpy.$(OBJ) \
+ $(SRCDIR)/port/wcslcat.$(OBJ) \
+ $(SRCDIR)/port/wcslcpy.$(OBJ) \
$(SRCDIR)/port/strsignal.$(OBJ)
BZIP2_OBJS=\
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=810168&r1=810167&r2=810168&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 1 18:57:11 2009
@@ -35,11 +35,17 @@
#if defined(ACR_WANT_STRLCPY)
size_t strlcpy(char *, const char *, size_t);
#endif
+#if defined(ACR_WANT_WCSLCAT)
+size_t wcslcat(wchar_t *, const wchar_t *, size_t);
+#endif
+#if defined(ACR_WANT_WCSLCPY)
+size_t wcslcpy(wchar_t *, const wchar_t *, size_t);
+#endif
#if defined(ACR_WANT_ISBLANK)
static ACR_INLINE int isblank(int c)
{
- return c == ' ' || c == '\t';
+ return c == ' ' || c == '\t';
}
#endif
Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h?rev=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h Tue Sep 1 18:57:11 2009
@@ -44,6 +44,8 @@
#define ACR_WANT_STRSIGNAL 1
#define ACR_WANT_STRLCAT 1
#define ACR_WANT_STRLCPY 1
+#define ACR_WANT_WCSLCAT 1
+#define ACR_WANT_WCSLCPY 1
#define ACR_WANT_FNMATCH 1
/**
@@ -52,9 +54,9 @@
#define APR_USE_SHMEM_SHMGET 1
#define APR_USE_SHMEM_SHMGET_ANON 1
#define APR_USE_SYSVSEM_SERIALIZE 1
-#define APR_USE_PTHREAD_SERIALIZE 1
+#define APR_USE_PTHREAD_SERIALIZE 1
#define APR_PROCESS_LOCK_IS_GLOBAL 0
-#define APR_HAVE_CORKABLE_TCP 0
+#define APR_HAVE_CORKABLE_TCP 0
#define APR_HAVE_SA_STORAGE 0
#define APR_HAVE_UNION_SEMUN 0
#define APR_HAVE_SCTP 0
Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h?rev=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h Tue Sep 1 18:57:11 2009
@@ -43,6 +43,8 @@
*/
#define ACR_WANT_STRLCAT 1
#define ACR_WANT_STRLCPY 1
+#define ACR_WANT_WCSLCAT 1
+#define ACR_WANT_WCSLCPY 1
/**
* Temporary APR flags
@@ -50,9 +52,9 @@
#define APR_USE_SHMEM_SHMGET 1
#define APR_USE_SHMEM_MMAP_ANON 1
#define APR_USE_SYSVSEM_SERIALIZE 1
-#define APR_USE_PTHREAD_SERIALIZE 1
+#define APR_USE_PTHREAD_SERIALIZE 1
#define APR_PROCESS_LOCK_IS_GLOBAL 0
-#define APR_HAVE_CORKABLE_TCP 1
+#define APR_HAVE_CORKABLE_TCP 1
#define APR_HAVE_SA_STORAGE 1
#define APR_HAVE_UNION_SEMUN 0
#define APR_HAVE_SCTP 0
Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h?rev=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h Tue Sep 1 18:57:11 2009
@@ -42,6 +42,8 @@
*/
#define ACR_WANT_STRLCAT 1
#define ACR_WANT_STRLCPY 1
+#define ACR_WANT_WCSLCAT 1
+#define ACR_WANT_WCSLCPY 1
#define ACR_WANT_FNMATCH 1
/**
@@ -50,9 +52,9 @@
#define APR_USE_SHMEM_SHMGET 1
#define APR_USE_SHMEM_MMAP_ANON 1
#define APR_USE_SYSVSEM_SERIALIZE 1
-#define APR_USE_PTHREAD_SERIALIZE 1
+#define APR_USE_PTHREAD_SERIALIZE 1
#define APR_PROCESS_LOCK_IS_GLOBAL 0
-#define APR_HAVE_CORKABLE_TCP 1
+#define APR_HAVE_CORKABLE_TCP 1
#define APR_HAVE_SA_STORAGE 1
#define APR_HAVE_UNION_SEMUN 1
#define APR_HAVE_SCTP 0
Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h?rev=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h Tue Sep 1 18:57:11 2009
@@ -87,6 +87,8 @@
#define ACR_WANT_STRSIGNAL 1
#define ACR_WANT_STRLCAT 1
#define ACR_WANT_STRLCPY 1
+#define ACR_WANT_WCSLCAT 1
+#define ACR_WANT_WCSLCPY 1
#define ACR_WANT_ISBLANK 1
#define ACR_WANT_FNMATCH 1
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c?rev=810168&r1=810167&r2=810168&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/temps.c Tue Sep 1 18:57:11 2009
@@ -24,6 +24,8 @@
#include "acr_env.h"
#include "acr_file.h"
+#define TMP_PATH_MAX (ACR_MBUFF_SIZ - 12)
+
static const wchar_t *_try_envs[] = {
L"TMP",
L"TEMP",
@@ -33,6 +35,17 @@
NULL
};
+static const wchar_t *_try_dirs[] = {
+ L"C:\\TMP",
+ L"C:\\TEMP",
+ L"C:\\WINDOWS\\TEMP",
+ NULL
+};
+
+static const unsigned wchar_t padchar[] =
+ L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+static unsigned int randseed = 0;
+
static int tmp_file_cleanup(void *file, int type, unsigned int flags)
{
acr_file_t *fp = (acr_file_t *)file;
@@ -50,6 +63,107 @@
return ACR_EBADF;
}
+static HANDLE gettemp(wchar_t *path, DWORD flags)
+{
+ wchar_t *start, *trv, *suffp;
+ wchar_t *pad;
+ HANDLE fh;
+ DWORD rc;
+ int randnum;
+
+ if (randseed == 0) {
+ randseed = GetTickCount();
+ srand(randseed);
+ }
+
+ for (trv = path; *trv; ++trv)
+ ;
+ suffp = trv;
+ --trv;
+ if (trv < path) {
+ ACR_SET_OS_ERROR(ACR_EINVAL);
+ return INVALID_HANDLE_VALUE;
+ }
+
+ /* Fill space with random characters */
+ while (*trv == L'X') {
+ randnum = rand() % 62;
+ *trv-- = padchar[randnum];
+ }
+ start = trv + 1;
+
+ /*
+ * check the target directory.
+ */
+ for (;; --trv) {
+ if (trv <= path)
+ break;
+ if (*trv == L'/' || *trv == L'\\') {
+ wchar_t s = *trv;
+ *trv = L'\0';
+ rc = GetFileAttributesW(path);
+ *trv = s;
+ if (rv == INVALID_FILE_ATTRIBUTES)
+ return INVALID_HANDLE_VALUE;
+ if (!(da & FILE_ATTRIBUTE_DIRECTORY)) {
+ ACR_SET_OS_ERROR(ACR_ENOTDIR);
+ return INVALID_HANDLE_VALUE;
+ }
+ break;
+ }
+ }
+
+ for (;;) {
+ fh = CreateFileW(path,
+ GENERIC_READ | GENERIC_WRITE,
+ 0,
+ NULL,
+ CREATE_NEW,
+ flags,
+ NULL);
+ if (fh == INVALID_HANDLE_VALUE) {
+ if (GetLastError() != ERROR_FILE_EXISTS)
+ return INVALID_HANDLE_VALUE;
+ }
+ else
+ return fh;
+ /* If we have a collision, cycle through the space of filenames */
+ for (trv = start;;) {
+ if (*trv == L'\0' || trv == suffp) {
+ /* XXX: is this the correct return code? */
+ ACR_SET_OS_ERROR(ACR_EINVAL);
+ return INVALID_HANDLE_VALUE;
+ }
+ pad = wcschr((wchar_t *)padchar, *trv);
+ if (pad == NULL || !*++pad) {
+ *trv++ = padchar[0];
+ }
+ else {
+ *trv++ = *pad;
+ break;
+ }
+ }
+ }
+ /*NOTREACHED*/
+ return INVALID_HANDLE_VALUE;
+}
+
+static int _temp_test(const wchar_t *path)
+{
+ wchar_t tp[ACR_MBUFF_SIZ];
+ HANDLE fh;
+
+ wcslcpy(tp, path, PATH_MAX);
+ wcslcat(tp, L"\\.acrXXXXXX", PATH_MAX);
+ fh = gettemp(tp, FILE_ATTRIBUTE_NORMAL);
+ if (IS_VALID_HANDLE(f)) {
+ CloseHandle(fh);
+ return 1;
+ }
+ else
+ return 0;
+}
+
ACR_DECLARE(int) ACR_TempFileMake(JNIEnv *_E, const wchar_t *tmpath,
const wchar_t *prefix, int preserve)
{
@@ -64,6 +178,37 @@
ACR_DECLARE(const wchar_t *) ACR_TempPathGet(JNIEnv *_E)
{
- return NULL;
-}
+ static wchar_t _temp_path[TMP_PATH_MAX] = L"";
+ int i = 0;
+ if (_temp_path[0])
+ return _temp_path;
+ while (_try_envs[i]) {
+ wchar_t *val = ACR_EnvGet(_try_envs[i]);
+ if (val && *val) {
+ if (wcslen(val) < TMP_PATH_MAX) {
+ if (_temp_test(val)) {
+ wcslcpy(_temp_path, val, TMP_PATH_MAX);
+ break;
+ }
+ }
+ }
+ i++;
+ }
+ if (_temp_path[0]) {
+ return _temp_path;
+ }
+ i = 0;
+ while (_try_dirs[i]) {
+ if (_temp_test(_try_dirs[i])) {
+ wcslcpy(_temp_path, _try_dirs[i], TMP_PATH_MAX);
+ break;
+ }
+ i++;
+ }
+ if (_temp_path[0]) {
+ return _temp_path;
+ }
+ else
+ return NULL;
+}
Added: commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c?rev=810168&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c Tue Sep 1 18:57:11 2009
@@ -0,0 +1,90 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <To...@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+
+#if defined(ACR_WANT_WCSLCAT)
+
+/*
+ * Appends src to string dst of size siz (unlike wcsncat, siz is the
+ * full size of dst, not space left). At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns wcslen(initial dst) + wcslen(src); if retval >= siz,
+ * truncation occurred.
+ */
+size_t
+wcslcat(wchar_t *dst, const wchar_t *src, size_t siz)
+{
+ wchar_t *d = dst;
+ const wchar_t *s = src;
+ size_t n = siz;
+ size_t dlen;
+
+ /* Find the end of dst and adjust bytes left but don't go past end */
+ while (*d != '\0' && n-- != 0)
+ d++;
+ dlen = d - dst;
+ n = siz - dlen;
+
+ if (n == 0)
+ return(dlen + wcslen(s));
+ while (*s != '\0') {
+ if (n != 1) {
+ *d++ = *s;
+ n--;
+ }
+ s++;
+ }
+ *d = '\0';
+
+ return(dlen + (s - src)); /* count does not include NUL */
+}
+
+#else
+
+UNUSED_SOURCE_FILE(wcslcat);
+
+#endif /* ACR_WANT_WCSLCAT */
Propchange: commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c?rev=810168&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c (added)
+++ commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c Tue Sep 1 18:57:11 2009
@@ -0,0 +1,86 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <To...@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "acr.h"
+#include "acr_private.h"
+#include "acr_arch.h"
+#include "acr_port.h"
+
+#if defined(ACR_WANT_WCSLCPY)
+
+/*
+ * Copy src to string dst of size siz. At most siz-1 characters
+ * will be copied. Always NUL terminates (unless siz == 0).
+ * Returns wcslen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz)
+{
+ wchar_t *d = dst;
+ const wchar_t *s = src;
+ size_t n = siz;
+
+ /* Copy as many bytes as will fit */
+ if (n != 0) {
+ while (--n != 0) {
+ if ((*d++ = *s++) == '\0')
+ break;
+ }
+ }
+
+ /* Not enough room in dst, add NUL and traverse rest of src */
+ if (n == 0) {
+ if (siz != 0)
+ *d = '\0'; /* NUL-terminate dst */
+ while (*s++)
+ ;
+ }
+
+ return (s - src - 1); /* count does not include NUL */
+}
+
+#else
+
+UNUSED_SOURCE_FILE(wcslcpy);
+
+#endif /* ACR_WANT_WCSLCPY */
Propchange: commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c
------------------------------------------------------------------------------
svn:eol-style = native