From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.1 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 38E151FAFF for ; Thu, 15 Dec 2022 20:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1671137579; bh=KiiHysLEhzN/5/Y1XgDhSIBlgC7IlUxGoFc7pJsMDME=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WmKnHqGXrr5Qrum8EwkdXAfNmetMwOK65nHV66To1UUDhbWUsWDSrXBdACqW/DOiK 9LKi/QwwKERnwt9rckpNFKBzmD9vAYiv2sMuugkAZdiD6lbgGkiCK8hdPYIzRdfRnP URel+vH1XPIH3Aj5J2mgeYZJPZzcMae4R+/PvmIc= From: Eric Wong To: mwrap-perl@80x24.org Subject: [PATCH 16/19] rename mwrap_httpd.h to httpd.h Date: Thu, 15 Dec 2022 20:52:52 +0000 Message-Id: <20221215205255.27840-17-e@80x24.org> In-Reply-To: <20221215205255.27840-1-e@80x24.org> References: <20221215205255.27840-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: No need to prefix our project name into every individual source file, especially since it's an auxilliary component. --- MANIFEST | 4 ++-- Mwrap.xs | 2 +- mwrap_httpd.h => httpd.h | 0 lib/Devel/Mwrap/PSGI.pm | 2 +- lib/Devel/Mwrap/Rproxy.pm | 4 ++-- mwrap_core.h | 2 +- mymalloc.h | 2 +- t/{mwrap-httpd.t => httpd.t} | 0 8 files changed, 8 insertions(+), 8 deletions(-) rename mwrap_httpd.h => httpd.h (100%) rename t/{mwrap-httpd.t => httpd.t} (100%) diff --git a/MANIFEST b/MANIFEST index 39473a5..4e3c487 100644 --- a/MANIFEST +++ b/MANIFEST @@ -8,12 +8,12 @@ check.h dlmalloc_c.h examples/mwrap.psgi gcc.h +httpd.h jhash.h lib/Devel/Mwrap.pm lib/Devel/Mwrap/PSGI.pm lib/Devel/Mwrap/Rproxy.pm mwrap_core.h -mwrap_httpd.h mymalloc.h picohttpparser.h picohttpparser_c.h @@ -21,7 +21,7 @@ ppport.h script/mwrap-perl script/mwrap-rproxy t/httpd-unit.t -t/mwrap-httpd.t +t/httpd.t t/mwrap.t t/source_location.perl t/test_common.perl diff --git a/Mwrap.xs b/Mwrap.xs index 9ebc082..568ec2b 100644 --- a/Mwrap.xs +++ b/Mwrap.xs @@ -12,7 +12,7 @@ */ typedef struct src_loc * Devel__Mwrap__SrcLoc; -/* keep this consistent with mwrap_httpd.h write_loc_name */ +/* keep this consistent with httpd.h write_loc_name */ static SV *location_string(struct src_loc *l) { SV *ret = newSV(0); diff --git a/mwrap_httpd.h b/httpd.h similarity index 100% rename from mwrap_httpd.h rename to httpd.h diff --git a/lib/Devel/Mwrap/PSGI.pm b/lib/Devel/Mwrap/PSGI.pm index 3e8795e..f2be733 100644 --- a/lib/Devel/Mwrap/PSGI.pm +++ b/lib/Devel/Mwrap/PSGI.pm @@ -1,7 +1,7 @@ # Copyright (C) all contributors # License: GPL-2.0+ # -# Note: this is deprecated, use mwrap_httpd.h instead +# Note: this is deprecated, use httpd.h instead package Devel::Mwrap::PSGI; use v5.12; # strict use warnings; diff --git a/lib/Devel/Mwrap/Rproxy.pm b/lib/Devel/Mwrap/Rproxy.pm index f7f8a82..76b7d7f 100644 --- a/lib/Devel/Mwrap/Rproxy.pm +++ b/lib/Devel/Mwrap/Rproxy.pm @@ -1,7 +1,7 @@ # Copyright (C) mwrap hackers # License: GPL-2.0+ -# minimal reverse proxy to expose the embedded mwrap_httpd.h UNIX sockets +# minimal reverse proxy to expose the embedded httpd.h UNIX sockets # via PSGI (and thus TCP HTTP/1.x). This does not have a hard dependency # on Mwrap.so. # @@ -69,7 +69,7 @@ sub call { # PSGI entry point my $h = "$method $uri HTTP/1.0\n\n"; $s = send($c, $h, MSG_NOSIGNAL) // return r(500, "send: $!"); $s == length($h) or return r(500, "send $s <".length($h)); - # this only expects mwrap_httpd.h output, so no continuation lines: + # this only expects httpd.h output, so no continuation lines: $h = do { local $/ = "\r\n\r\n"; <$c> } // return r(500, "read: $!"); my ($code, @hdr) = split(/\r\n/, $h); (undef, $code, undef) = split(/ /, $code); diff --git a/mwrap_core.h b/mwrap_core.h index d798b79..1b3d98f 100644 --- a/mwrap_core.h +++ b/mwrap_core.h @@ -958,7 +958,7 @@ static struct src_loc *mwrap_get_bin(const char *buf, size_t len) } static const char *mwrap_env; -#include "mwrap_httpd.h" +#include "httpd.h" __attribute__((constructor)) static void mwrap_ctor(void) { diff --git a/mymalloc.h b/mymalloc.h index 2e0517b..518cce3 100644 --- a/mymalloc.h +++ b/mymalloc.h @@ -126,7 +126,7 @@ ATTR_COLD static void mstate_tsd_dtor(void *p) CHECK(int, 0, pthread_mutex_unlock(&global_mtx)); } -/* see mwrap_httpd.h */ +/* see httpd.h */ static void h1d_atfork_prepare(void); static void h1d_atfork_parent(void); static void h1d_start(void); diff --git a/t/mwrap-httpd.t b/t/httpd.t similarity index 100% rename from t/mwrap-httpd.t rename to t/httpd.t