From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.bugs Subject: bug#40075: patch Date: Sat, 21 Mar 2020 09:43:40 -0700 Message-ID: <6161915b-1a8f-6a01-461f-0d5d10256060@gmail.com> References: <20200315125504.rrmol63wdryna5pn@danbala> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124375"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= To: 40075@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Mar 21 17:44:10 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFhEI-000WHm-2Q for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 17:44:10 +0100 Original-Received: from localhost ([::1]:39012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFhEG-00018Z-M8 for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 12:44:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51057) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFhEB-00018G-EK for bug-guile@gnu.org; Sat, 21 Mar 2020 12:44:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFhEA-0001ga-Bh for bug-guile@gnu.org; Sat, 21 Mar 2020 12:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41920) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFhEA-0001gR-8k for bug-guile@gnu.org; Sat, 21 Mar 2020 12:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFhEA-000716-4Q for bug-guile@gnu.org; Sat, 21 Mar 2020 12:44:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20200315125504.rrmol63wdryna5pn@danbala> Resent-From: Matt Wette Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 21 Mar 2020 16:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40075 X-GNU-PR-Package: guile Original-Received: via spool by 40075-submit@debbugs.gnu.org id=B40075.158480903326946 (code B ref 40075); Sat, 21 Mar 2020 16:44:02 +0000 Original-Received: (at 40075) by debbugs.gnu.org; 21 Mar 2020 16:43:53 +0000 Original-Received: from localhost ([127.0.0.1]:47893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFhE0-00070W-Vk for submit@debbugs.gnu.org; Sat, 21 Mar 2020 12:43:53 -0400 Original-Received: from mail-pf1-f177.google.com ([209.85.210.177]:45550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFhDz-00070H-4N for 40075@debbugs.gnu.org; Sat, 21 Mar 2020 12:43:51 -0400 Original-Received: by mail-pf1-f177.google.com with SMTP id j10so5022844pfi.12 for <40075@debbugs.gnu.org>; Sat, 21 Mar 2020 09:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Zoe0TTpSqhAu6yYpXRXvrZZ3xbAH6odLNVPb8jYz71I=; b=mwSssnunIpSRUrmTNuhIJtJlHCAlVIkTuqCPHVbrLp1Aeg2SXRPcoS2X/PtmqCKdUt Od+Vb6OeEpBiyJ2LcTc1eAnT3gCOITGRQvU2gR0+Gj55KIxRE5MwJ9yad8RtspsO/5co mvhRIt3vMtFKhu/D5R2V54tKMJdt1qGgaqqwNCB/EARRyLBuzVkyGq56klvX5T7A9xUW YVCcC5BxCqSa3RM03FN9SfJ390huO4XY+TAZB2s09FD8npO6/MYOfvMt7shBStXlEC4w zA8DxT0trBST4pm7MlGSnWeSCUJLqaWlwo5rRcsuaNpGkTq83luncZqASGla6VzzKOd2 9gNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Zoe0TTpSqhAu6yYpXRXvrZZ3xbAH6odLNVPb8jYz71I=; b=MGnURTSC3PaamsS0kM/1C/qqKeOOvoWDJPMoGHTzqD3nuR9sOYmW5fjnzY1kCpnU0i gvFP2EVwbA4Ot4rwJ/KWSxZJbF7x7L7LmvDUx7588MMNrfeoe/wgnyB5L8ZMxxbRGNB+ MpMAjkWqXTAJ9UNA+FkNk2MkmaYm33qS2wHoE75iebYhhyd8pJ2InwwWCLEAht2kH/MV Ic6g6m6lGzdgTIcoRtJygnSaHGsvvuB21NU00HsexTQ1orASUFpx7/jXfS1ZDG3Ub4vB l4hgNUaKxd5FIIJZxQora/qdOHdqAaNI/i6kZ7E4d+/kzzNLFjUAZp1rKVu2iJpv9i10 ysAw== X-Gm-Message-State: ANhLgQ3LSAlXfIm3/tn9G39IJeK8Cn92jUgoSruZydVCfKQpNOci56D+ +qpaIFyyUbbI5207b5r2Uuk= X-Google-Smtp-Source: ADFU+vuJPP2zqHI3xW8gxPKQUgIijUujBP0Su1OhLsoiQX9aTJfxdcKwZV2SsRcVCD0r4QkBT6UBtg== X-Received: by 2002:a63:a35c:: with SMTP id v28mr14707549pgn.251.1584809022904; Sat, 21 Mar 2020 09:43:42 -0700 (PDT) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id l62sm8183726pgd.82.2020.03.21.09.43.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Mar 2020 09:43:42 -0700 (PDT) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9664 Archived-At: Below is a patch against guile-3.0.1. "make" works, "make check" works. null-threads.c was not seeing "SCM_USE_NULL_THREADS" so include libguile/scmconfig.h null-threads.c was not seeing def of SCM_API so include "libguile/scm.h" web-server.test used (if (provided? 'threads) ) so #undefined if no threads. --- libguile/null-threads.h-orig    2020-03-21 08:12:37.852229565 -0700 +++ libguile/null-threads.h    2020-03-21 08:33:26.239759647 -0700 @@ -36,6 +36,8 @@  #include  #include +#include "libguile/scm.h" +  /* Threads  */  typedef int scm_i_pthread_t; --- libguile/null-threads.c-orig    2020-03-21 08:07:50.113439437 -0700 +++ libguile/null-threads.c    2020-03-21 08:08:32.681573253 -0700 @@ -23,6 +23,7 @@  #include +#include "libguile/scmconfig.h"  #if SCM_USE_NULL_THREADS  #include "null-threads.h" --- test-suite/tests/web-server.test-orig    2020-03-21 09:29:57.688813542 -0700 +++ test-suite/tests/web-server.test    2020-03-21 09:35:08.850651216 -0700 @@ -93,25 +93,25 @@      "not found"    (expect http-get "/does-not-exist" 404)) -(pass-if-equal "GET with keep-alive" -    '("Hello, λ world!" -      "Écrit comme ça en Latin-1." -      "GNU Guile") -  (if (provided? 'threads) +(if (provided? 'threads) +    (pass-if-equal "GET with keep-alive" +      '("Hello, λ world!" +    "Écrit comme ça en Latin-1." +    "GNU Guile")        (let ((port (open-socket-for-uri %server-base-uri))) -        (define result -          (map (lambda (path) -                 (let-values (((response body) -                               (http-get (string-append %server-base-uri path) -                                         #:port port -                                         #:keep-alive? #t -                                         #:headers -                                         '((user-agent . "GNU Guile"))))) -                   (and (= (response-code response) 200) -                        body))) -               '("/" "/latin1" "/user-agent"))) -        (close-port port) -        result))) +    (define result +      (map (lambda (path) +         (let-values (((response body) +                   (http-get (string-append %server-base-uri path) +                     #:port port +                     #:keep-alive? #t +                     #:headers +                     '((user-agent . "GNU Guile"))))) +           (and (= (response-code response) 200) +            body))) +           '("/" "/latin1" "/user-agent"))) +    (close-port port) +    result)))  (pass-if-equal "POST /"      "forbidden"