aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index fc2f846b0dc..4bd1f54b9e6 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -26,9 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <pwd.h> 26#include <pwd.h>
27#include <grp.h> 27#include <grp.h>
28#endif /* HAVE_PWD_H */ 28#endif /* HAVE_PWD_H */
29#ifdef HAVE_LIMITS_H
30#include <limits.h> 29#include <limits.h>
31#endif /* HAVE_LIMITS_H */
32#include <unistd.h> 30#include <unistd.h>
33 31
34#include <allocator.h> 32#include <allocator.h>
@@ -2215,59 +2213,6 @@ rmdir (char *dpath)
2215#endif /* !HAVE_RMDIR */ 2213#endif /* !HAVE_RMDIR */
2216 2214
2217 2215
2218#ifndef HAVE_MEMSET
2219void *
2220memset (void *b, int n, size_t length)
2221{
2222 unsigned char *p = b;
2223 while (length-- > 0)
2224 *p++ = n;
2225 return b;
2226}
2227#endif /* !HAVE_MEMSET */
2228
2229#ifndef HAVE_MEMCPY
2230void *
2231memcpy (void *b1, void *b2, size_t length)
2232{
2233 unsigned char *p1 = b1, *p2 = b2;
2234 while (length-- > 0)
2235 *p1++ = *p2++;
2236 return b1;
2237}
2238#endif /* !HAVE_MEMCPY */
2239
2240#ifndef HAVE_MEMMOVE
2241void *
2242memmove (void *b1, void *b2, size_t length)
2243{
2244 unsigned char *p1 = b1, *p2 = b2;
2245 if (p1 < p2 || p1 >= p2 + length)
2246 while (length-- > 0)
2247 *p1++ = *p2++;
2248 else
2249 {
2250 p1 += length;
2251 p2 += length;
2252 while (length-- > 0)
2253 *--p1 = *--p2;
2254 }
2255 return b1;
2256}
2257#endif /* !HAVE_MEMCPY */
2258
2259#ifndef HAVE_MEMCMP
2260int
2261memcmp (void *b1, void *b2, size_t length)
2262{
2263 unsigned char *p1 = b1, *p2 = b2;
2264 while (length-- > 0)
2265 if (*p1++ != *p2++)
2266 return p1[-1] < p2[-1] ? -1 : 1;
2267 return 0;
2268}
2269#endif /* !HAVE_MEMCMP */
2270
2271#ifndef HAVE_STRSIGNAL 2216#ifndef HAVE_STRSIGNAL
2272char * 2217char *
2273strsignal (int code) 2218strsignal (int code)