comparison src/termcap.c @ 12675:8c9369149a9d

Move #define of bcopy to after #include <string.h>.
author David J. MacKenzie <djm@gnu.org>
date Wed, 26 Jul 1995 17:54:50 +0000
parents e34e076c5d47
children a14b26e55f25
comparison
equal deleted inserted replaced
12674:411fcd86eeeb 12675:8c9369149a9d
1 /* Work-alike for termcap, plus extra features. 1 /* Work-alike for termcap, plus extra features.
2 Copyright (C) 1985, 1986, 1993, 1994 Free Software Foundation, Inc. 2 Copyright (C) 1985, 86, 93, 94, 95 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
25 #ifdef USG5 25 #ifdef USG5
26 #include <fcntl.h> 26 #include <fcntl.h>
27 #endif 27 #endif
28 28
29 #else /* not HAVE_CONFIG_H */ 29 #else /* not HAVE_CONFIG_H */
30
31 #if defined(HAVE_STRING_H) || defined(STDC_HEADERS)
32 #define bcopy(s, d, n) memcpy ((d), (s), (n))
33 #endif
34 30
35 #ifdef STDC_HEADERS 31 #ifdef STDC_HEADERS
36 #include <stdlib.h> 32 #include <stdlib.h>
37 #include <string.h> 33 #include <string.h>
38 #else 34 #else
39 char *getenv (); 35 char *getenv ();
40 char *malloc (); 36 char *malloc ();
41 char *realloc (); 37 char *realloc ();
38 #endif
39
40 /* Do this after the include, in case string.h prototypes bcopy. */
41 #if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
42 #define bcopy(s, d, n) memcpy ((d), (s), (n))
42 #endif 43 #endif
43 44
44 #ifdef HAVE_UNISTD_H 45 #ifdef HAVE_UNISTD_H
45 #include <unistd.h> 46 #include <unistd.h>
46 #endif 47 #endif