summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-04-07 18:26:02 +0000
committerRichard M. Stallman <rms@gnu.org>1995-04-07 18:26:02 +0000
commit14bea9bdff41337e1fa4f4b0fd5db05cd8d80279 (patch)
tree3ac338fa2ce3deed5dffc7a8f29e09e68afb4d64 /src/sysdep.c
parentd89eb17b0c21b54253e6acca96fe4b9a2655a837 (diff)
downloademacs-14bea9bdff41337e1fa4f4b0fd5db05cd8d80279.tar.gz
(bcopy): If NEED_BCOPY, do compile this.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c161
1 files changed, 83 insertions, 78 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 74c58559a16..a61747bd014 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1388,8 +1388,10 @@ init_sys_modes ()
#endif
#if defined (HAVE_TERMIOS) || defined (HPUX9)
+#ifdef TCOON
if (!flow_control) tcflow (input_fd, TCOON);
#endif
+#endif
#ifdef AIXHFT
hft_init ();
@@ -2640,84 +2642,6 @@ sys_sigsetmask (sigset_t new_mask)
#endif /* POSIX_SIGNALS */
-#ifndef BSTRING
-
-#ifndef bzero
-
-void
-bzero (b, length)
- register char *b;
- register int length;
-{
-#ifdef VMS
- short zero = 0;
- long max_str = 65535;
-
- while (length > max_str) {
- (void) LIB$MOVC5 (&zero, &zero, &zero, &max_str, b);
- length -= max_str;
- b += max_str;
- }
- max_str = length;
- (void) LIB$MOVC5 (&zero, &zero, &zero, &max_str, b);
-#else
- while (length-- > 0)
- *b++ = 0;
-#endif /* not VMS */
-}
-
-#endif /* no bzero */
-
-#ifndef bcopy
-/* Saying `void' requires a declaration, above, where bcopy is used
- and that declaration causes pain for systems where bcopy is a macro. */
-bcopy (b1, b2, length)
- register char *b1;
- register char *b2;
- register int length;
-{
-#ifdef VMS
- long max_str = 65535;
-
- while (length > max_str) {
- (void) LIB$MOVC3 (&max_str, b1, b2);
- length -= max_str;
- b1 += max_str;
- b2 += max_str;
- }
- max_str = length;
- (void) LIB$MOVC3 (&length, b1, b2);
-#else
- while (length-- > 0)
- *b2++ = *b1++;
-#endif /* not VMS */
-}
-#endif /* no bcopy */
-
-#ifndef bcmp
-int
-bcmp (b1, b2, length) /* This could be a macro! */
- register char *b1;
- register char *b2;
- register int length;
-{
-#ifdef VMS
- struct dsc$descriptor_s src1 = {length, DSC$K_DTYPE_T, DSC$K_CLASS_S, b1};
- struct dsc$descriptor_s src2 = {length, DSC$K_DTYPE_T, DSC$K_CLASS_S, b2};
-
- return STR$COMPARE (&src1, &src2);
-#else
- while (length-- > 0)
- if (*b1++ != *b2++)
- return 1;
-
- return 0;
-#endif /* not VMS */
-}
-#endif /* no bcmp */
-
-#endif /* not BSTRING */
-
#ifndef HAVE_RANDOM
#ifdef random
#define HAVE_RANDOM
@@ -5038,3 +4962,84 @@ dlclose ()
}
#endif /* USE_DL_STUBS */
+
+#ifndef BSTRING
+
+#ifndef bzero
+
+void
+bzero (b, length)
+ register char *b;
+ register int length;
+{
+#ifdef VMS
+ short zero = 0;
+ long max_str = 65535;
+
+ while (length > max_str) {
+ (void) LIB$MOVC5 (&zero, &zero, &zero, &max_str, b);
+ length -= max_str;
+ b += max_str;
+ }
+ max_str = length;
+ (void) LIB$MOVC5 (&zero, &zero, &zero, &max_str, b);
+#else
+ while (length-- > 0)
+ *b++ = 0;
+#endif /* not VMS */
+}
+
+#endif /* no bzero */
+#endif /* BSTRING */
+
+#if (defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY)
+#undef bcopy
+
+/* Saying `void' requires a declaration, above, where bcopy is used
+ and that declaration causes pain for systems where bcopy is a macro. */
+bcopy (b1, b2, length)
+ register char *b1;
+ register char *b2;
+ register int length;
+{
+#ifdef VMS
+ long max_str = 65535;
+
+ while (length > max_str) {
+ (void) LIB$MOVC3 (&max_str, b1, b2);
+ length -= max_str;
+ b1 += max_str;
+ b2 += max_str;
+ }
+ max_str = length;
+ (void) LIB$MOVC3 (&length, b1, b2);
+#else
+ while (length-- > 0)
+ *b2++ = *b1++;
+#endif /* not VMS */
+}
+#endif /* (defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */
+
+#ifdef BSTRING
+#ifndef bcmp
+int
+bcmp (b1, b2, length) /* This could be a macro! */
+ register char *b1;
+ register char *b2;
+ register int length;
+{
+#ifdef VMS
+ struct dsc$descriptor_s src1 = {length, DSC$K_DTYPE_T, DSC$K_CLASS_S, b1};
+ struct dsc$descriptor_s src2 = {length, DSC$K_DTYPE_T, DSC$K_CLASS_S, b2};
+
+ return STR$COMPARE (&src1, &src2);
+#else
+ while (length-- > 0)
+ if (*b1++ != *b2++)
+ return 1;
+
+ return 0;
+#endif /* not VMS */
+}
+#endif /* no bcmp */
+#endif /* not BSTRING */