From 3085237cdc02088dc5ffbdda813b768970592d1e Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sun, 6 Jun 2010 01:57:39 -0700 Subject: [PATCH] Remove BSTRING related code, all platforms define it. * src/s/usg5-4.h (BSTRING): Remove definition. * src/s/template.h (BSTRING): * src/s/msdos.h (BSTRING): * src/s/ms-w32.h (BSTRING): * src/s/hpux10-20.h (BSTRING): * src/s/gnu-linux.h (BSTRING): * src/s/darwin.h (BSTRING): * src/s/cygwin.h (BSTRING): * src/s/bsd-common.h (BSTRING): * src/s/aix4-2.h (BSTRING): Likewise. * src/sysdep.c: Remove code depending on BSTRING not being defined. * configure.in: Remove code dealing with BSTRING. * lib-src/ntlib.h: Remove code dealing with BSTRING. * nt/config.nt: Remove code depending on BSTRING. --- ChangeLog | 4 +++ admin/CPP-DEFINES | 1 - configure.in | 8 ----- lib-src/ChangeLog | 4 +++ lib-src/ntlib.h | 6 ---- nt/ChangeLog | 4 +++ nt/config.nt | 8 ----- src/ChangeLog | 15 ++++++++++ src/config.in | 73 +++++++++++++++++++++------------------------- src/s/aix4-2.h | 3 -- src/s/bsd-common.h | 3 -- src/s/cygwin.h | 3 -- src/s/darwin.h | 3 -- src/s/gnu-linux.h | 3 -- src/s/hpux10-20.h | 6 ---- src/s/ms-w32.h | 2 -- src/s/msdos.h | 3 -- src/s/template.h | 3 -- src/s/usg5-4.h | 2 -- src/sysdep.c | 48 ------------------------------ 20 files changed, 61 insertions(+), 141 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6601e8fc488..368fad0f498 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * configure.in: Remove code dealing with BSTRING. + 2010-06-03 Dan Nicolaescu * configure.in (AC_PREREQ): Require autoconf 2.65. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index d5247777110..4425b79edeb 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -49,7 +49,6 @@ subprocesses System can use subprocesses (for M-x shell for example). Define USE_LISP_UNION_TYPE Define it in lisp.h to make Lisp_Object be a union type instead of the default int. ** System specific macros, decribed in detail in src/s/template.h -BSTRING CLASH_DETECTION COFF FIRST_PTY_LETTER diff --git a/configure.in b/configure.in index f97af0bed68..3e3d3ddd972 100644 --- a/configure.in +++ b/configure.in @@ -3565,14 +3565,6 @@ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* Some of the files of Emacs which are intended for use with other programs assume that if you have a config.h file, you must declare the type of getenv. */ diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index d23fe3ff6c2..d086226886c 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * ntlib.h: Remove code dealing with BSTRING. + 2010-05-29 Chong Yidong * emacsclient.c (longopts, decode_options, print_help_and_exit): diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index ab1e7ba2866..fd51269fdfd 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h @@ -43,12 +43,6 @@ int setegid (unsigned gid); char * getpass (const char * prompt); int fchown (int fd, unsigned uid, unsigned gid); -#ifndef BSTRING -#define bzero(b, l) memset(b, 0, l) -#define bcopy(s, d, l) memcpy(d, s, l) -#define bcmp(a, b, l) memcmp(a, b, l) -#endif - /* redirect or undo interceptions created by config.h */ #undef access #define access _access diff --git a/nt/ChangeLog b/nt/ChangeLog index 1f13c17cfb6..5e5abf6b771 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2010-06-06 Dan Nicolaescu + + * config.nt: Remove code depending on BSTRING. + 2010-06-03 Glenn Morris * config.nt: Remove NOT_C_CODE tests, it is always true now. diff --git a/nt/config.nt b/nt/config.nt index c2a933ecbce..e3bb4792b70 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -347,14 +347,6 @@ along with GNU Emacs. If not, see . */ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* Non-ANSI C compilers usually don't have volatile. */ #ifndef HAVE_VOLATILE #ifndef __STDC__ diff --git a/src/ChangeLog b/src/ChangeLog index e7ac2d066b0..608e6b28395 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2010-06-06 Dan Nicolaescu + + Remove BSTRING related code, all platforms define it. + * s/usg5-4.h (BSTRING): Remove definition. + * s/template.h (BSTRING): + * s/msdos.h (BSTRING): + * s/ms-w32.h (BSTRING): + * s/hpux10-20.h (BSTRING): + * s/gnu-linux.h (BSTRING): + * s/darwin.h (BSTRING): + * s/cygwin.h (BSTRING): + * s/bsd-common.h (BSTRING): + * s/aix4-2.h (BSTRING): Likewise. + * sysdep.c: Remove code depending on BSTRING not being defined. + 2010-06-05 Juanma Barranquero Remove obsolete macro BASE_LEADING_CODE_P. diff --git a/src/config.in b/src/config.in index 1197a01e8f7..997e4668421 100644 --- a/src/config.in +++ b/src/config.in @@ -312,10 +312,10 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the header file. */ #undef HAVE_KERBEROS_KRB_H -/* Define to 1 if `e_text' is member of `krb5_error'. */ +/* Define to 1 if `e_text' is a member of `krb5_error'. */ #undef HAVE_KRB5_ERROR_E_TEXT -/* Define to 1 if `text' is member of `krb5_error'. */ +/* Define to 1 if `text' is a member of `krb5_error'. */ #undef HAVE_KRB5_ERROR_TEXT /* Define to 1 if you have the header file. */ @@ -606,25 +606,25 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `strsignal' function. */ #undef HAVE_STRSIGNAL -/* Define to 1 if `ifr_addr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_addr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_ADDR -/* Define to 1 if `ifr_broadaddr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_broadaddr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_BROADADDR -/* Define to 1 if `ifr_flags' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_flags' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_FLAGS -/* Define to 1 if `ifr_hwaddr' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_HWADDR -/* Define to 1 if `ifr_netmask' is member of `struct ifreq'. */ +/* Define to 1 if `ifr_netmask' is a member of `struct ifreq'. */ #undef HAVE_STRUCT_IFREQ_IFR_NETMASK -/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */ +/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */ #undef HAVE_STRUCT_NLIST_N_UN_N_NAME -/* Define to 1 if `tm_zone' is member of `struct tm'. */ +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if `struct utimbuf' is declared by . */ @@ -853,6 +853,9 @@ along with GNU Emacs. If not, see . */ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -912,6 +915,28 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if using the Motif X toolkit. */ #undef USE_MOTIF +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Define to 1 if we should use toolkit scroll bars. */ #undef USE_TOOLKIT_SCROLL_BARS @@ -947,28 +972,6 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to rpl_ if the getopt replacement functions and variables should be used. */ #undef __GETOPT_PREFIX @@ -1093,14 +1096,6 @@ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ #define my_strftime nstrftime /* for strftime.c */ -/* The rest of the code currently tests the CPP symbol BSTRING. - Override any claims made by the system-description files. - Note that on some SCO version it is possible to have bcopy and not bcmp. */ -#undef BSTRING -#if defined (HAVE_BCOPY) && defined (HAVE_BCMP) -#define BSTRING -#endif - /* Some of the files of Emacs which are intended for use with other programs assume that if you have a config.h file, you must declare the type of getenv. */ diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 32c29675012..48f43126fd9 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -52,9 +52,6 @@ along with GNU Emacs. If not, see . */ functions. Almost, but not quite the same as the 4.2 functions. */ #define SYSV_SYSTEM_DIR -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* The file containing the kernel's symbol table is called /unix. */ #define KERNEL_FILE "/unix" diff --git a/src/s/bsd-common.h b/src/s/bsd-common.h index 1d7ebbace13..ffb7a637488 100644 --- a/src/s/bsd-common.h +++ b/src/s/bsd-common.h @@ -71,9 +71,6 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 6204cee392b..93df925fcab 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -73,9 +73,6 @@ along with GNU Emacs. If not, see . */ } \ while (0) -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ diff --git a/src/s/darwin.h b/src/s/darwin.h index 399c3d325c1..5c8db1242e1 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -99,9 +99,6 @@ along with GNU Emacs. If not, see . */ for process-connection-type dependent on the kernel version. */ #define MIN_PTY_KERNEL_VERSION '7' -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 8b63865d9f9..80092f725fc 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -89,9 +89,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* This is used in list_system_processes. */ #define HAVE_PROCFS 1 diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 1a9c2056632..8d9c73e2368 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -45,12 +45,6 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS -/* Define this symbol if your system has the functions bcopy, etc. - s800 and later versions of s300 (s200) kernels have equivalents - of the BSTRING functions of BSD. If your s200 kernel doesn't have - em comment out this section. */ -#define BSTRING - /* Define CLASH_DETECTION if you want lock files to be written so that Emacs can tell instantly when you try to modify a file that someone else has modified in his Emacs. */ diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 1fcf73d2578..ea32373e02b 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h @@ -63,8 +63,6 @@ along with GNU Emacs. If not, see . */ for received packets, so datagrams are broken too. */ #define BROKEN_DATAGRAM_SOCKETS 1 -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING #define bzero(b, l) memset(b, 0, l) #define bcopy(s, d, l) memmove(d, s, l) #define bcmp(a, b, l) memcmp(a, b, l) diff --git a/src/s/msdos.h b/src/s/msdos.h index c78096c6b90..af272635968 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -42,9 +42,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ #define SYSV_SYSTEM_DIR -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* Define this is the compiler understands `volatile'. */ #define HAVE_VOLATILE diff --git a/src/s/template.h b/src/s/template.h index f355d67b8c6..694a1046566 100644 --- a/src/s/template.h +++ b/src/s/template.h @@ -78,9 +78,6 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_PTYS if the system supports pty devices. */ #define HAVE_PTYS -/* Define this symbol if your system has the functions bcopy, etc. */ -#define BSTRING - /* subprocesses should be undefined if you do NOT want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index 9810ab3e67f..b3518d7db9f 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h @@ -63,8 +63,6 @@ along with GNU Emacs. If not, see . */ /* If we're using the System V X port, BSD bstring functions will be handy. */ #ifdef HAVE_X_WINDOWS -#define BSTRING -#endif /* HAVE_X_WINDOWS */ /* On USG systems signal handlers return void. */ #define SIGTYPE void diff --git a/src/sysdep.c b/src/sysdep.c index ba2a7493d74..e311d181c9c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2751,54 +2751,6 @@ rmdir (dpath) } #endif /* !HAVE_RMDIR */ - -#ifndef BSTRING - -#ifndef bzero - -void -bzero (b, length) - register char *b; - register int length; -{ - while (length-- > 0) - *b++ = 0; -} - -#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; -{ - while (length-- > 0) - *b2++ = *b1++; -} -#endif /* (!defined (BSTRING) && !defined (bcopy)) || defined (NEED_BCOPY) */ - -#ifndef BSTRING -#ifndef bcmp -int -bcmp (b1, b2, length) /* This could be a macro! */ - register char *b1; - register char *b2; - register int length; -{ - while (length-- > 0) - if (*b1++ != *b2++) - return 1; - - return 0; -} -#endif /* no bcmp */ -#endif /* not BSTRING */ #ifndef HAVE_STRSIGNAL char * -- 2.39.2