Re: [PATCH] use unlocked stdio functions

2024-02-17 Thread Grisha Levit
On Sat, Feb 17, 2024, 12:29 Chet Ramey wrote: > On 2/16/24 9:37 PM, Grisha Levit wrote: > > After this change, `make -C examples/loadables others` fails building > > necho.o with: > > > > use of undeclared identifier 'fflush_unlocked' > > I can't reproduce this on macOS, but these changes se

Re: [PATCH] use unlocked stdio functions

2024-02-17 Thread Chet Ramey
On 2/16/24 9:37 PM, Grisha Levit wrote: After this change, `make -C examples/loadables others` fails building necho.o with: use of undeclared identifier 'fflush_unlocked' I can't reproduce this on macOS, but these changes seem reasonable. Chet -- ``The lyf so short, the craft so long to

Re: [PATCH] use unlocked stdio functions

2024-02-16 Thread Grisha Levit
After this change, `make -C examples/loadables others` fails building necho.o with: use of undeclared identifier 'fflush_unlocked' I checked other object files to make sure the expected symbols are used and they were, except for the loadable pushd. Also added the dependency where needed in M

Re: [PATCH] use unlocked stdio functions

2024-02-14 Thread Chet Ramey
On 2/14/24 11:18 AM, Vito Caputo wrote: On Wed, Feb 14, 2024 at 10:59:57AM -0500, Chet Ramey wrote: On 2/5/24 10:47 PM, Grisha Levit wrote: Bash makes many calls to stdio functions that may have unlocked_stdio(3) equivalents. Since the locking functionality provided by the regular versions is o

Re: [PATCH] use unlocked stdio functions

2024-02-14 Thread Vito Caputo
On Wed, Feb 14, 2024 at 10:59:57AM -0500, Chet Ramey wrote: > On 2/5/24 10:47 PM, Grisha Levit wrote: > > Bash makes many calls to stdio functions that may have unlocked_stdio(3) > > equivalents. Since the locking functionality provided by the regular > > versions is only useful in multi-threaded a

Re: [PATCH] use unlocked stdio functions

2024-02-14 Thread Chet Ramey
On 2/5/24 10:47 PM, Grisha Levit wrote: Bash makes many calls to stdio functions that may have unlocked_stdio(3) equivalents. Since the locking functionality provided by the regular versions is only useful in multi-threaded applications, it probably makes sense for Bash to use the *_unlocked vers

[PATCH] use unlocked stdio functions

2024-02-05 Thread Grisha Levit
Bash makes many calls to stdio functions that may have unlocked_stdio(3) equivalents. Since the locking functionality provided by the regular versions is only useful in multi-threaded applications, it probably makes sense for Bash to use the *_unlocked versions where available. E.g. in situations