Bug 235404 - LEGACY_BSDSED_COMPAT issue
Summary: LEGACY_BSDSED_COMPAT issue
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-01 19:19 UTC by Sergey
Modified: 2020-06-07 20:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2019-02-01 19:19:15 UTC
I want to revert sed's behaviour to original/BSD one. But I haven't found a place where I can define "LEGACY_BSDSED_COMPAT" variable. The check happens here:

#ifdef LEGACY_BSDSED_COMPAT
		EATSPACE();
#endif

Where can I define LEGACY_BSDSED_COMPAT ?
Regards,
Sergey
Comment 1 Sergey 2019-02-01 19:21:17 UTC
file path is /usr/src/usr.bin/sed/compile.c
Comment 2 Kyle Evans freebsd_committer 2020-06-07 20:37:36 UTC
You would need to add it to CFLAGS in your /etc/make.conf or /etc/src.conf, e.g.

CFLAGS+= -DLEGACY_BSDSED_COMPAT

Then rebuild at least sed(1).

Closing as "Not a bug" since this is technically not a bug, but feel free to re-open as needed. :)