clean up header inclusions
2012-03-16 Paolo Bonzini <bonzini@gnu.org> * basicdefs.h: Enjoy gnulib's headers. * sed/compile.c: Likewise. * sed/execute.c: Likewise. * sed/regexp.c: Likewise. * sed/sed.c: Likewise. * sed/sed.h: Likewise. * sed/utils.c: Likewise.
This commit is contained in:
1 parent
944747af30
commit
9ea38da9fb
8 files changed
+30
-147
No files matched your search
@@ -1,3 +1,13 @@
|
||||
2012-03-16 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* basicdefs.h: Enjoy gnulib's headers.
|
||||
* sed/compile.c: Likewise.
|
||||
* sed/execute.c: Likewise.
|
||||
* sed/regexp.c: Likewise.
|
||||
* sed/sed.c: Likewise.
|
||||
* sed/sed.h: Likewise.
|
||||
* sed/utils.c: Likewise.
|
||||
|
||||
2012-03-16 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* bootstrap.sh.in: Remove.
|
||||
|
||||
+3
-37
@@ -19,18 +19,9 @@
|
||||
#define BASICDEFS_H
|
||||
|
||||
#include <alloca.h>
|
||||
|
||||
#ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
#endif
|
||||
#ifdef HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <wchar.h>
|
||||
#include <locale.h>
|
||||
#include <wctype.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <gettext.h>
|
||||
@@ -91,31 +82,6 @@ typedef unsigned long countT;
|
||||
#define obstack_chunk_free ck_free
|
||||
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
# ifndef memmove
|
||||
/* ../lib/libsed.a provides a memmove() if the system doesn't.
|
||||
Here is where we declare its return type; we don't prototype
|
||||
it because that sometimes causes problems when we're running in
|
||||
bootstrap mode on a system which really does support memmove(). */
|
||||
extern VOID *memmove();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
# ifndef memcpy
|
||||
# define memcpy(d, s, n) memmove(d, s, n)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
extern char *strerror P_((int e));
|
||||
#endif
|
||||
|
||||
|
||||
/* handle misdesigned <ctype.h> macros (snarfed from lib/regex.c) */
|
||||
/* Jim Meyering writes:
|
||||
|
||||
|
||||
+3
-21
@@ -21,27 +21,9 @@
|
||||
#include "sed.h"
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif /* HAVE_STRINGS_H */
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <obstack.h>
|
||||
|
||||
|
||||
|
||||
+6
-36
@@ -25,20 +25,18 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include "stat-macros.h"
|
||||
|
||||
#include <selinux/selinux.h>
|
||||
#include <selinux/context.h>
|
||||
#include "acl.h"
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__-0 >= 7)
|
||||
/* silence warning about unused parameter even for "gcc -W -Wunused" */
|
||||
@@ -49,34 +47,6 @@ extern int errno;
|
||||
# define UNUSED
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif /*HAVE_STRINGS_H*/
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCHR
|
||||
# define strchr index
|
||||
# define strrchr rindex
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "stat-macros.h"
|
||||
|
||||
|
||||
/* Sed operates a line at a time. */
|
||||
struct line {
|
||||
|
||||
+1
-3
@@ -21,9 +21,7 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef gettext_noop
|
||||
# define N_(String) gettext_noop(String)
|
||||
|
||||
@@ -21,41 +21,13 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif /*HAVE_STRINGS_H*/
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCHR
|
||||
# define strchr index
|
||||
# define strrchr rindex
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include "getopt.h"
|
||||
|
||||
#include "version-etc.h"
|
||||
|
||||
#ifndef HAVE_STDLIB_H
|
||||
extern char *getenv P_((const char *));
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRTOUL
|
||||
# define ATOI(x) atoi(x)
|
||||
#else
|
||||
# define ATOI(x) strtoul(x, NULL, 0)
|
||||
#endif
|
||||
|
||||
#define AUTHORS \
|
||||
_("Jay Fenlason"), \
|
||||
_("Tom Lord"), \
|
||||
@@ -246,7 +218,7 @@ main(argc, argv)
|
||||
*/
|
||||
if (cols)
|
||||
{
|
||||
countT t = ATOI(cols);
|
||||
countT t = atoi(cols);
|
||||
if (t > 1)
|
||||
lcmd_out_line_len = t-1;
|
||||
}
|
||||
@@ -293,7 +265,7 @@ main(argc, argv)
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
lcmd_out_line_len = ATOI(optarg);
|
||||
lcmd_out_line_len = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "basicdefs.h"
|
||||
#include "regex.h"
|
||||
#include <stdio.h>
|
||||
|
||||
+2
-14
@@ -21,20 +21,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#else
|
||||
# include <string.h>
|
||||
#endif /* HAVE_STRINGS_H */
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif /* HAVE_STDLIB_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in new issue
Block a user