Bug 3376 - Documentation says C89 compiler required but C99 compiler is actually required
Summary: Documentation says C89 compiler required but C99 compiler is actually required
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 8.8p1
Hardware: ix86 Linux
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-30 06:53 AEDT by Gregory Katz
Modified: 2022-01-15 14:35 AEDT (History)
1 user (show)

See Also:


Attachments
Provide c89-compatible logging functions (5.60 KB, patch)
2021-12-31 12:54 AEDT, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Katz 2021-12-30 06:53:41 AEDT
I'm trying to compile a OpenSSH portable for a system that has a C89 capable compiler, but not a C99 capable compiler, which the INSTALL file says should work: "A C compiler.  Any C89 or better compiler should work." However, the configure script checks for C99. Might make sense to update the INSTALL file.

Thanks for all your hard work on OpenSSH. Truly an amazing piece of software. I remember when I was skeptical about switching from telnet.
Comment 1 Darren Tucker 2021-12-31 12:54:47 AEDT
Created attachment 3560 [details]
Provide c89-compatible logging functions

AFAIK the only thing we have that's not c89 are the variadic logging macros, and as indicated by the comment in configure.ac, we had a vague plan to provide functions that don't need those.

I took a stab at it (it'll lose the ability to show file, line and function but otherwise should work).
Comment 2 Gregory Katz 2022-01-15 14:35:52 AEDT
Thanks Darren, and apologies for the delayed response. This patch got me most of the way to compiling. I also had to move some variable initializations up in openbsd-compat/sha2.c, but I'm not sure if that's strictly a C89 limitation, and modify utf8.c (because it was complaining that CODESET was undefined).

I wasn't able to test the changes to configure.ac--my system was too old to generate a new configure script, so I just manually disabled the test in the provided configure script.

At any rate, the ssh client works well which is a small miracle, but the server segfaults. Not bad, in my opinion.