Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify return type of main() in conftest.c #268

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hfsutils/configure
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 713 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is C code, right? Not C++? If so, specify the function arguments:

Suggested change
int main(){return(0);}
int main(void){return(0);}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right.
However, there also are thousands of this description in other configure files.
The purpose of this PR is to make the minimum fix to be able to build on macOS, and I don't intend to fix thousands of things.

EOF
if { (eval echo configure:717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
Expand Down
4 changes: 2 additions & 2 deletions hfsutils/libhfs/configure
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 659 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
EOF
if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
Expand Down Expand Up @@ -1278,7 +1278,7 @@ else
#line 1279 "configure"
#include "confdefs.h"

main()
int main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
Expand Down
2 changes: 1 addition & 1 deletion hfsutils/librsrc/configure
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 659 "configure"
#include "confdefs.h"
main(){return(0);}
int main(){return(0);}
EOF
if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
Expand Down
Loading