[exim-cvs] Add stpcpy() implementation for older platforms (…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Add stpcpy() implementation for older platforms (Solaris 10)
Gitweb: https://git.exim.org/exim.git/commitdiff/f59da709bd8a9653262b3fd5c6ddd47ee473f64a
Commit:     f59da709bd8a9653262b3fd5c6ddd47ee473f64a
Parent:     6567b79f79a209265a52340bd0fd30667d8aef46
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Nov 29 13:50:36 2024 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Nov 29 13:50:36 2024 +0000


    Add stpcpy() implementation for older platforms (Solaris 10)
---
 src/OS/os.h-SunOS5 |  1 +
 src/src/os.c       | 13 +++++++++++++
 2 files changed, 14 insertions(+)


diff --git a/src/OS/os.h-SunOS5 b/src/OS/os.h-SunOS5
index b3f55bf83..b6c0a2b97 100644
--- a/src/OS/os.h-SunOS5
+++ b/src/OS/os.h-SunOS5
@@ -42,6 +42,7 @@ it seems. */

#if _POSIX_C_SOURCE < 200809L
# define MISSING_POSIX_MEMALIGN
+# define MISSING_POSIX_STPCPY
#endif


diff --git a/src/src/os.c b/src/src/os.c
index dce5fca3d..10fbcb45b 100644
--- a/src/src/os.c
+++ b/src/src/os.c
@@ -907,6 +907,19 @@ return CS s;


/* ----------------------------------------------------------------------- */
+/* stpcpy() */
+
+#ifdef MISSING_POSIX_STPCPY
+char *
+stpcpy(char * restrict dst, const char * restrict src)
+{
+while ((*dst = *src++)) dst++;
+return dst;
+}
+
+#endif
+
+/* ----------------------------------------------------------------------- */




--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/