From owner-svn-src-all@freebsd.org Sun Aug 25 00:55:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D201D09DE; Sun, 25 Aug 2019 00:55:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46GGsB3CvNz4M7R; Sun, 25 Aug 2019 00:55:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50D3CD9F8; Sun, 25 Aug 2019 00:55:42 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7P0tgBp064243; Sun, 25 Aug 2019 00:55:42 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7P0tgam064242; Sun, 25 Aug 2019 00:55:42 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201908250055.x7P0tgam064242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sun, 25 Aug 2019 00:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351465 - stable/12/release/picobsd/tinyware/simple_httpd X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/release/picobsd/tinyware/simple_httpd X-SVN-Commit-Revision: 351465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Aug 2019 00:55:42 -0000 Author: eugen Date: Sun Aug 25 00:55:41 2019 New Revision: 351465 URL: https://svnweb.freebsd.org/changeset/base/351465 Log: MFC r351179: simple_httpd was not buildable for some time due to multiple missing "static" keywords and -Werror,-Wmissing-variable-declarations This change adds needed "static" so it builds again with WARNS?=6 No functional changes. Modified: stable/12/release/picobsd/tinyware/simple_httpd/simple_httpd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/release/picobsd/tinyware/simple_httpd/simple_httpd.c ============================================================================== --- stable/12/release/picobsd/tinyware/simple_httpd/simple_httpd.c Sat Aug 24 22:07:38 2019 (r351464) +++ stable/12/release/picobsd/tinyware/simple_httpd/simple_httpd.c Sun Aug 25 00:55:41 2019 (r351465) @@ -48,33 +48,33 @@ #include #include -int http_port = 80; -int daemonize = 1; -int verbose = 0; -int http_sock, con_sock; +static int http_port = 80; +static int daemonize = 1; +static int verbose = 0; +static int http_sock, con_sock; -const char *fetch_mode = NULL; -char homedir[100]; -char logfile[80]; -char *adate(void); -void init_servconnection(void); -void http_date(void); -void http_output(const char *html); -void http_request(void); -void log_line(char *req); -void wait_connection(void); +static const char *fetch_mode = NULL; +static char homedir[100]; +static char logfile[80]; +static char *adate(void); +static void init_servconnection(void); +static void http_date(void); +static void http_output(const char *html); +static void http_request(void); +static void log_line(char *req); +static void wait_connection(void); -struct hostent *hst; -struct sockaddr_in source; +static struct hostent *hst; +static struct sockaddr_in source; /* HTTP basics */ static char httpd_server_ident[] = "Server: FreeBSD/PicoBSD simple_httpd 1.1\r"; static char http_200[] = "HTTP/1.0 200 OK\r"; -const char *default_mime_type = "application/octet-stream"; +static const char *default_mime_type = "application/octet-stream"; -const char *mime_type[][2] = { +static const char *mime_type[][2] = { { "txt", "text/plain" }, { "htm", "text/html" }, { "html", "text/html" }, @@ -83,7 +83,7 @@ const char *mime_type[][2] = { { "mp3", "audio/mpeg" } }; -const int mime_type_max = sizeof(mime_type) / sizeof(mime_type[0]) - 1; +static const int mime_type_max = sizeof(mime_type) / sizeof(mime_type[0]) - 1; /* Two parts, HTTP Header and then HTML */ static const char *http_404[2] = @@ -101,7 +101,7 @@ This server only supports GET and HEAD requests.\n