#include <stdio.h>

extern void helloer(void);

int main() {
    printf("Calling helloer\n");
    helloer();
    printf("Helloer called\n");
}
#include <stdio.h>

extern void helloer(void);

int main() {
    printf("Calling helloer\n");
    helloer();
    printf("Helloer called\n");
    return 0;
}

Fix test failures with GCC
rust: Fix test failures with GCC

Summary:
GCC 4.8.5 (and likely other versions of GCC) compiles C code as C89
(-std=gnu89) by default. In C89, if main does not explicitly return, the
program's exit code is unspecified. This means the hello program in
cxx_with_rust_dep can return non-zero on success.

Many of Buck's tests assert that the hello program exits with a zero
exit code. When these tests use GCC 4.8.5, the tests often fail, since
the exit code is non-zero.

Fix the test failures by making the hello program explicitly return zero
on success.

(Some other compilers compile C code as C99 or C11 by default. Since
C99, if main does not explicitly return, the program's exit code is
zero. This means the hello program always returns zero on success.)

Reviewed By: styurin

fbshipit-source-id: 46c4dd6f68
