Skip to content

Commit

Permalink
Merge pull request trusteddomainproject#171 from orlitzky/configure.a…
Browse files Browse the repository at this point in the history
…c-c-standard

configure.ac: update main() signatures to conform to the standard.
libvbr/vbr.c: fix function signature for vbr_strlcpy into modern C style.
  • Loading branch information
futatuki committed Apr 24, 2024
2 parents d5c4cf1 + 1f55173 commit 62af18c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
14 changes: 7 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ dnscheck='
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>
int main() {
int main(int argc, char** argv) {
res_mkquery (0, 0, 0, 0, 0, 0, 0, 0, 0);
dn_expand (0, 0, 0, 0, 0);
dn_skipname (0, 0);
Expand Down Expand Up @@ -549,7 +549,7 @@ gprof_gmon_out="unknown"
if test x"$hasgprof" = x"yes"
then
gprofcheck='
int main() {
int main(int argc, char** argv) {
long x;

x = random();
Expand Down Expand Up @@ -747,7 +747,7 @@ then
#if GNUTLS_VERSION_NUMBER < 0x020b07
# error GnuTLS 2.11.7 or later required
#endif
int main()
int main(int argc, char** argv)
{
return 0;
}'
Expand All @@ -759,7 +759,7 @@ then

sha256check='
#include <gnutls/gnutls.h>
int main()
int main(int argc, char** argv)
{
int x = GNUTLS_DIG_SHA256;
}'
Expand Down Expand Up @@ -1191,7 +1191,7 @@ then
#include <libmemcached/memcached.h>
int
main()
main(int argc, char** argv)
{
memcached_return_t x;
Expand Down Expand Up @@ -1649,7 +1649,7 @@ then
#endif
int
main()
main(int argc, char** argv)
{
return 0;
}
Expand Down Expand Up @@ -1859,7 +1859,7 @@ then
#endif
int
main()
main(int argc, char** argv)
{
return 0;
}
Expand Down
7 changes: 2 additions & 5 deletions libvbr/vbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,9 @@ static void vbr_error __P((VBR *, const char *, ...));
*/

size_t
vbr_strlcpy(dst, src, size)
register char *dst;
register const char *src;
ssize_t size;
vbr_strlcpy(char *dst, const char *src, ssize_t size)
{
register ssize_t i;
ssize_t i;

if (size-- <= 0)
return strlen(src);
Expand Down

0 comments on commit 62af18c

Please sign in to comment.