sed: remove basicdefs.h

It is now so small that separating it is more trouble than it’s worth.
* Makefile.am (noinst_HEADERS): Remove basicdefs.h.
* basicdefs.h: Remove.
* sed/sed.h: Do not include basicdefs.h.  Instead, include gettext.h
and define ‘_’.
* sed/utils.c: Include utils.h first, to check that it’s standalone.
Do not include idx.h, since utils.h does that for us.
Include gettext.h and define ‘_’.
* sed/utils.h: Include idx.h instead of basicdefs.h.
This commit is contained in:
Paul Eggert committed 2026-08-17 01:17:23 -07:00
1 parent 5ba9bc5cfb
commit c7221b9610
5 files changed
+11 -31

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ SUFFIXES =
bin_PROGRAMS =
noinst_LIBRARIES =
noinst_DATA =
noinst_HEADERS = basicdefs.h
noinst_HEADERS =
DISTCLEANFILES =
EXTRA_DIST += BUGS THANKS.in \
-26
View File
@@ -1,26 +0,0 @@
/* GNU SED, a batch stream editor.
Copyright (C) 1998-2026 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; If not, see <https://www.gnu.org/licenses/>. */
#ifndef BASICDEFS_H
#define BASICDEFS_H
#include <gettext.h>
#define _(String) gettext(String)
#include "idx.h"
#include "xalloc.h"
#endif /*!BASICDEFS_H*/
+4 -1
View File
@@ -15,7 +15,7 @@
along with this program; If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include "basicdefs.h"
#include "dfa.h"
#include "localeinfo.h"
#include "mcel.h"
@@ -26,6 +26,9 @@
#include "utils.h"
#include <gettext.h>
#define _(msgid) gettext (msgid)
_GL_INLINE_HEADER_BEGIN
#ifndef SED_INLINE
+5 -2
View File
@@ -16,6 +16,8 @@
#include <config.h>
#include "utils.h"
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
@@ -28,15 +30,16 @@
#include "binary-io.h"
#include "min-eloop-threshold.h"
#include "idx.h"
#include "minmax.h"
#include "quotearg.h"
#include "unlocked-io.h"
#include "utils.h"
#include "progname.h"
#include "fwriting.h"
#include "xalloc.h"
#include <gettext.h>
#define _(msgid) gettext (msgid)
#ifdef SSIZE_MAX
# define SSIZE_IDX_MAX MIN (SSIZE_MAX, IDX_MAX)
#else
+1 -1
View File
@@ -16,7 +16,7 @@
#include <stdio.h>
#include "basicdefs.h"
#include "idx.h"
enum exit_codes {
/* EXIT_SUCCESS is already defined as 0 */