From: Matt Wette <matt.wette@gmail.com>
To: 40075@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: bug#40075: patch
Date: Sat, 21 Mar 2020 09:43:40 -0700 [thread overview]
Message-ID: <6161915b-1a8f-6a01-461f-0d5d10256060@gmail.com> (raw)
In-Reply-To: <20200315125504.rrmol63wdryna5pn@danbala>
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) <test>) 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 <signal.h>
#include <errno.h>
+#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 <stdlib.h>
+#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"
next prev parent reply other threads:[~2020-03-21 16:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-15 12:55 bug#40075: guile-3.0.1: --without-threads build failure on NetBSD Thomas Klausner
2020-03-18 23:47 ` bug#40075: tmpnam Matt Wette
2020-03-21 14:30 ` bug#40075: oops Matt Wette
2020-03-21 14:37 ` bug#40075: pthreads Matt Wette
2020-03-21 16:43 ` Matt Wette [this message]
2020-03-21 17:28 ` bug#40075: patch Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6161915b-1a8f-6a01-461f-0d5d10256060@gmail.com \
--to=matt.wette@gmail.com \
--cc=40075@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).