]> Nishi Git Mirror - tewi.git/commitdiff
fix
authorNishi <nishi@nishi.boats>
Mon, 16 Sep 2024 13:15:59 +0000 (13:15 +0000)
committerNishi <nishi@nishi.boats>
Mon, 16 Sep 2024 13:15:59 +0000 (13:15 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@34 8739d7e6-ffea-ec47-b151-bdff447c6205

Server/main.c
Server/strptime.c

index 5e5f663cf172c581b037f36f3c684a5d41e7d98a..a51e94d2f834bea571123b5e2bdcdbe856ba49cc 100644 (file)
@@ -39,6 +39,11 @@ int main(int argc, char** argv) {
                                        return 1;
                                }
                                confpath = argv[i];
+                       } else if(strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0) {
+                               printf("Tewi HTTPd Tewi/%s\n", tw_get_version());
+                               printf("Under public domain.\n");
+                               printf("Copyright (C) 2024 Nishi\n");
+                               return 0;
                        } else {
                                fprintf(stderr, "Unknown option: %s\n", argv[i]);
                                return 1;
index a703060dd22d23b46951e488aeda2671bda3a23e..ce0f05d822e8b2f14e89b99e9269c9357939622b 100644 (file)
@@ -35,6 +35,8 @@
 //#include <sys/cdefs.h>
 //__RCSID("$NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $");
 
+#ifdef __MINGW32__
+
 #include <ctype.h>
 #include <string.h>
 #include <time.h>
@@ -832,3 +834,5 @@ find_string(const unsigned char *bp, int *tgt, const char * const *n1,
     /* Nothing matched */
     return NULL;
 }
+
+#endif