luser-dr00g / xpost

A PostScript interpreter in C
Other
93 stars 12 forks source link

is dirname really needed ? #52

Closed vtorri closed 2 years ago

vtorri commented 2 years ago

in configure.ac, i can see:

if ! test "x${ac_cv_func_dirname}" = "xyes" ; then
   AC_MSG_ERROR([dirname() function is mandatory, exiting...])
fi

but dirname() is not used at all (git grep dirname)

should we remove that check ?

luser-dr00g commented 2 years ago

Yes, it looks like it's not used anymore so it isn't needed. I think it got removed when we switched to an environment variable to find the /data directory instead of trying to find the path to the executable and finding the relative path from there. It can be removed.

On Sun, Sep 19, 2021 at 1:52 AM vtorri @.***> wrote:

in configure.ac, i can see:

if ! test "x${ac_cv_func_dirname}" = "xyes" ; then AC_MSG_ERROR([dirname() function is mandatory, exiting...]) fi

but dirname() is not used at all (git grep dirname)

should we remove that check ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/luser-dr00g/xpost/issues/52, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSMFVY7WRFQ4Y3LKLVCXZDUCWCCTANCNFSM5EKAOBVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

vtorri commented 2 years ago

and I guess that libgen.h check can also be removed. I think that it was for dirname()

luser-dr00g commented 2 years ago

Yes, it looks like the only things available in libgen.h are basename() and dirname(). Oracle appears to have a special version with lots of crazy functions and the Posix version may have once held regcmp() and regex(). But yeah, we're not using any of that stuff.

Just using the ENV made everything so much easier. :)

vtorri commented 2 years ago

fixed in git