leafnode  1.12.0
About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.
  Fossies Dox: leafnode-1.12.0.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

leafnode-version.c
Go to the documentation of this file.
1/* (C) 2002 - 2021 by Matthias Andree
2 *
3 * This file is under the same license as the rest of leafnode. Please see the
4 * file "COPYING" that should be in the same directory as this.
5 */
6
7#include "leafnode.h"
8
9#include <stdio.h>
10#include <string.h>
11
12int main(int argc, char **argv) {
13 static char env_path[] = "PATH=/bin:/usr/bin";
14 uint8_t pcre2info[64]; /* PCRE 10 requires at least 24 code units */
15
16 /* DO NOT CHANGE THE OUTPUT FORMAT; EXTERNAL TOOLS DEPEND ON IT!
17 * (namely, leafwa does)
18 */
19 fputs("version: leafnode-", stdout);
20 puts(version);
21
22 /* new in 1.11.7: -v mode to print more information, such as directories */
23 if (argc > 1 &&
24 (0 == strcmp(argv[1], "-v")
25 || 0 == strcmp(argv[1], "--verbose")))
26 {
27 fputs("current machine: ", stdout);
28 fflush(stdout);
29 putenv(env_path);
30 if (system("uname -a"))
31 puts(" (error)");
32 fputs("sysconfdir: ", stdout);
33 puts(sysconfdir);
34 fputs("spooldir: ", stdout);
35 puts(spooldir);
36 fputs("lockfile: ", stdout);
37 puts(lockfile);
38#ifdef HAVE_IPV6
39 puts("IPv6: yes");
40#else
41 puts("IPv6: no");
42#endif
43#ifdef HAVE_GETIFADDRS
44 puts("HAVE_GETIFADDRS: yes");
45#else
46 puts("HAVE_GETIFADDRS: no");
47#endif
48 pcre2_config_8(PCRE2_CONFIG_VERSION, pcre2info);
49 printf("PCRE2 version: %s\n", pcre2info);
50
51 pcre2_config_8(PCRE2_CONFIG_UNICODE_VERSION, pcre2info);
52 printf("PCRE2 Unicode version: %s\n", pcre2info);
53 }
54 return 0;
55}
int main(int argc, char **argv)
const char * sysconfdir
const char * spooldir
const char * version
const char * lockfile