summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński (amade) <amade@asmblr.net>2011-01-07 02:38:51 +0100
committerAmadeusz Sławiński <amade@asmblr.net>2014-07-24 11:50:45 +0200
commit6eb0452290fe091adc9d63cea498a009b7ec8565 (patch)
tree2764be106709f997c9186f1ff8b238c208187c3a
parent74311e2686579de607e3662231a32fab8d0ab8e9 (diff)
downloadscreen-6eb0452290fe091adc9d63cea498a009b7ec8565.tar.gz
remove unneded check logic, as we no longer use bcopy
-rw-r--r--src/acconfig.h15
-rw-r--r--src/configure.in45
-rw-r--r--src/extern.h3
-rw-r--r--src/misc.c18
-rw-r--r--src/os.h13
-rw-r--r--src/screen.c3
6 files changed, 0 insertions, 97 deletions
diff --git a/src/acconfig.h b/src/acconfig.h
index 2ede634..eff9ea0 100644
--- a/src/acconfig.h
+++ b/src/acconfig.h
@@ -405,21 +405,6 @@
#undef GETTTYENT
/*
- * Define USEBCOPY if the bcopy/memcpy from your system's C library
- * supports the overlapping of source and destination blocks. When
- * undefined, screen uses its own (probably slower) version of bcopy().
- *
- * SYSV machines may have a working memcpy() -- Oh, this is
- * quite unlikely. Tell me if you see one.
- * "But then, memmove() should work, if at all available" he thought...
- * Boing, never say "works everywhere" unless you checked SCO UNIX.
- * Their memove fails the test in the configure script. Sigh. (Juergen)
- */
-#undef USEBCOPY
-#undef USEMEMCPY
-#undef USEMEMMOVE
-
-/*
* If your system has vsprintf() and requires the use of the macros in
* "varargs.h" to use functions with variable arguments,
* define USEVARARGS.
diff --git a/src/configure.in b/src/configure.in
index 9b02f0c..bb34037 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1169,51 +1169,6 @@ AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
AC_CHECKING(fdwalk)
AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
-AC_TRY_RUN([
-main() {
- char buf[10];
- strcpy(buf, "abcdefghi");
- bcopy(buf, buf + 2, 3);
- if (strncmp(buf, "ababcf", 6))
- exit(1);
- strcpy(buf, "abcdefghi");
- bcopy(buf + 2, buf, 3);
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
-}], AC_DEFINE(USEBCOPY))
-
-AC_TRY_RUN([
-#define bcopy(s,d,l) memmove(d,s,l)
-main() {
- char buf[10];
- strcpy(buf, "abcdefghi");
- bcopy(buf, buf + 2, 3);
- if (strncmp(buf, "ababcf", 6))
- exit(1);
- strcpy(buf, "abcdefghi");
- bcopy(buf + 2, buf, 3);
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
-}], AC_DEFINE(USEMEMMOVE))
-
-
-AC_TRY_RUN([
-#define bcopy(s,d,l) memcpy(d,s,l)
-main() {
- char buf[10];
- strcpy(buf, "abcdefghi");
- bcopy(buf, buf + 2, 3);
- if (strncmp(buf, "ababcf", 6))
- exit(1);
- strcpy(buf, "abcdefghi");
- bcopy(buf + 2, buf, 3);
- if (strncmp(buf, "cdedef", 6))
- exit(1);
- exit(0); /* libc version works properly. */
-}], AC_DEFINE(USEMEMCPY))
AC_SYS_LONG_FILE_NAMES
diff --git a/src/extern.h b/src/extern.h
index 1404964..f312707 100644
--- a/src/extern.h
+++ b/src/extern.h
@@ -328,9 +328,6 @@ extern void centerline (char *, int);
extern void leftline (char *, int, struct mchar *);
extern char *Filename (char *);
extern char *stripdev (char *);
-#ifdef NEED_OWN_BCOPY
-extern void xbcopy (char *, char *, int);
-#endif
extern void bclear (char *, int);
extern void closeallfiles (int);
extern int UserContext (void);
diff --git a/src/misc.c b/src/misc.c
index e3ba5f4..98501be 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -284,24 +284,6 @@ xsetegid(int egid)
#endif /* HAVE_SETEUID */
-
-#ifdef NEED_OWN_BCOPY
-void
-xbcopy(register char *s1, register char *s2, register int len)
-{
- if (s1 < s2 && s2 < s1 + len)
- {
- s1 += len;
- s2 += len;
- while (len-- > 0)
- *--s2 = *--s1;
- }
- else
- while (len-- > 0)
- *s2++ = *s1++;
-}
-#endif /* NEED_OWN_BCOPY */
-
void
bclear(char *p, int n)
{
diff --git a/src/os.h b/src/os.h
index ab69d6e..70bafde 100644
--- a/src/os.h
+++ b/src/os.h
@@ -127,19 +127,6 @@ extern int errno;
# define getcwd(b,l) getwd(b)
#endif
-#ifndef USEBCOPY
-# ifdef USEMEMMOVE
-# define bcopy(s,d,len) memmove(d,s,len)
-# else
-# ifdef USEMEMCPY
-# define bcopy(s,d,len) memcpy(d,s,len)
-# else
-# define NEED_OWN_BCOPY
-# define bcopy xbcopy
-# endif
-# endif
-#endif
-
#if defined(HAVE_SETRESUID) && !defined(HAVE_SETREUID)
# define setreuid(ruid, euid) setresuid(ruid, euid, -1)
# define setregid(rgid, egid) setresgid(rgid, egid, -1)
diff --git a/src/screen.c b/src/screen.c
index 96bc47f..0414808 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -403,9 +403,6 @@ main(int argc, char **argv)
#ifdef hpux
debug("hpux\n");
#endif
-#ifdef USEBCOPY
- debug("USEBCOPY\n");
-#endif
#ifdef UTMPOK
debug("UTMPOK\n");
#endif