* strfuncs.cc (strccpy): ...to here.
* string.h (strccpy): Declare.
* winsup.h (strccpy): Drop declaration.
+2011-01-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * exec.cc (strccpy): Move function from here...
+ * strfuncs.cc (strccpy): ...to here.
+ * string.h (strccpy): Declare.
+ * winsup.h (strccpy): Drop declaration.
+
2011-01-19 Corinna Vinschen <corinna@vinschen.de>
* errno.cc (errmap): Add error codes for invalid binaries.
return 0;
}
-/* Copy string, until c or <nul> is encountered.
- NUL-terminate the destination string (s1).
- Return pointer to terminating byte in dst string. */
-
-char * __stdcall
-strccpy (char *s1, const char **s2, char c)
-{
- while (**s2 && **s2 != c)
- *s1++ = *((*s2)++);
- *s1 = 0;
-
- MALLOC_CHECK;
- return s1;
-}
-
extern "C" int
execvp (const char *path, char * const *argv)
{
/* strfuncs.cc: misc funcs that don't belong anywhere else
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
This file is part of Cygwin.
return ret;
}
+/* Copy string, until c or <nul> is encountered.
+ NUL-terminate the destination string (s1).
+ Return pointer to terminating byte in dst string. */
+char * __stdcall
+strccpy (char *s1, const char **s2, char c)
+{
+ while (**s2 && **s2 != c)
+ *s1++ = *((*s2)++);
+ *s1 = 0;
+
+ MALLOC_CHECK;
+ return s1;
+}
+
static WCHAR hex_wchars[] = L"0123456789abcdef";
NTSTATUS NTAPI
/* string.h: Extra string defs
- Copyright 2001, 2007, 2008 Red Hat, Inc.
+ Copyright 2001, 2007, 2008, 2011 Red Hat, Inc.
This file is part of Cygwin.
#endif /* __INSIDE_CYGWIN__ */
+char *__stdcall strccpy (char *s1, const char **s2, char c);
+
#ifdef __cplusplus
}
#endif
__ino64_t __stdcall hash_path_name (__ino64_t hash, const char *name) __attribute__ ((regparm(2)));
void __stdcall nofinalslash (const char *src, char *dst) __attribute__ ((regparm(2)));
-/* String manipulation */
-extern "C" char *__stdcall strccpy (char *s1, const char **s2, char c);
-
void *hook_or_detect_cygwin (const char *, const void *, WORD&) __attribute__ ((regparm (3)));
/* Time related */