Strongly link tr and sed into system() and popen()

This commit is contained in:
Justine Tunney 2024-11-15 21:19:08 -08:00
parent cafdb456ed
commit 1312f60245
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 51 additions and 22 deletions

View file

@ -3,6 +3,7 @@
#include "libc/calls/typedef/u.h"
#include "libc/limits.h"
#include "third_party/regex/regex.h"
#include "third_party/sed/shade.h"
COSMOPOLITAN_C_START_
/*

View file

@ -4,6 +4,7 @@
#include "libc/stdio/stdio.h"
#include "third_party/regex/regex.h"
#include "third_party/sed/defs.h"
#include "third_party/sed/shade.h"
COSMOPOLITAN_C_START_
extern struct s_command *prog;

31
third_party/sed/shade.h vendored Normal file
View file

@ -0,0 +1,31 @@
#ifndef COSMOPOLITAN_THIRD_PARTY_SED_SHADE_H_
#define COSMOPOLITAN_THIRD_PARTY_SED_SHADE_H_
#define prog _sed_prog
#define appends_ _sed_appends_
#define g_match _sed_g_match
#define maxnsub _sed_maxnsub
#define linenum _sed_linenum
#define appendnum _sed_appendnum
#define aflag _sed_aflag
#define eflag _sed_eflag
#define nflag _sed_nflag
#define fname _sed_fname
#define outfname _sed_outfname
#define infile _sed_infile
#define outfile _sed_outfile
#define rflags _sed_rflags
#define cfclose _sed_cfclose
#define compile _sed_compile
#define cspace _sed_cspace
#define cu_fgets _sed_cu_fgets
#define mf_fgets _sed_mf_fgets
#define lastline _sed_lastline
#define process _sed_process
#define resetstate _sed_resetstate
#define strregerror _sed_strregerror
#define xmalloc _sed_xmalloc
#define xrealloc _sed_xrealloc
#define xcalloc _sed_xcalloc
#endif /* COSMOPOLITAN_THIRD_PARTY_SED_SHADE_H_ */