help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check if file size greater than a small number?


From: Greg Wooledge
Subject: Re: Check if file size greater than a small number?
Date: Thu, 10 Mar 2022 11:44:06 -0500

On Thu, Mar 10, 2022 at 10:30:54AM -0600, Jesse Hathaway wrote:
> Below is my attempt at a fix, any feedback would be appreciated:
> 
> --- stat.orig.c 2022-03-10 10:27:48.529197073 -0600
> +++ stat.c 2022-03-10 10:28:53.120944839 -0600
> @@ -35,6 +35,7 @@
>  #include <grp.h>
>  #include <errno.h>
>  #include "posixtime.h"
> +#include <stdbool.h>

stdbool.h is from C99, but I think bash is written for C89 compliance.
I could be mistaken.

There's a ./configure check for stdbool.h at the top level, but I'm not
quite sure what the code does with the results of that.  It doesn't
appear to be reflected in the examples/loadables directory at all.

unicorn:/var/tmp/bash/bash-5.1/examples/loadables$ grep -i bool *
grep: perl: Is a directory

I would simply use an int, and 0 or 1, rather than counting on stdbool.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]