From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Thomas Klausner Newsgroups: gmane.emacs.bugs Subject: bug#39363: emacs-git version: pthread_setname_np on NetBSD Date: Fri, 31 Jan 2020 00:02:13 +0100 Message-ID: <20200130230213.z5fkdsj2zjodhjrc@danbala> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="2vy64ret6zgn7wdh" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="33744"; mail-complaints-to="usenet@ciao.gmane.io" To: 39363@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 31 00:03:32 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ixIqS-0008jU-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 Jan 2020 00:03:32 +0100 Original-Received: from localhost ([::1]:40612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixIqR-0000qx-J2 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Jan 2020 18:03:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34058) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixIpz-0000m2-VX for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixIpy-0007jV-Mv for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58620) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ixIpy-0007is-Iw for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ixIpy-0003HX-De for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Klausner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Jan 2020 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39363 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158042535012549 (code B ref -1); Thu, 30 Jan 2020 23:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Jan 2020 23:02:30 +0000 Original-Received: from localhost ([127.0.0.1]:36354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixIpR-0003GL-QM for submit@debbugs.gnu.org; Thu, 30 Jan 2020 18:02:30 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:46723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ixIpQ-0003GE-Eb for submit@debbugs.gnu.org; Thu, 30 Jan 2020 18:02:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33774) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixIpM-0008HT-WD for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:02:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixIpK-0006aC-8Y for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:02:23 -0500 Original-Received: from danbala.ifoer.tuwien.ac.at ([128.130.168.114]:61854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ixIpJ-0006Te-TV for bug-gnu-emacs@gnu.org; Thu, 30 Jan 2020 18:02:22 -0500 Original-Received: by danbala.ifoer.tuwien.ac.at (Postfix, from userid 116) id CF20EBAF5; Fri, 31 Jan 2020 00:02:13 +0100 (CET) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: FreeBSD [generic] [fuzzy] 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-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175457 Archived-At: --2vy64ret6zgn7wdh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi! Recently, emacs from git stopped compiling on NetBSD because it started using pthread_setname_np. AFAIK, there is no commonly agreed upon standard for this function, and NetBSD's uses three arguments, see https://netbsd.gw.com/cgi-bin/man-cgi?pthread_setname_np++NetBSD-current The attached patch makes emacs compile again (on NetBSD-9.99.43/amd64) but configure should probably be taught to look for that version of pthread_setname_np instead of the #ifdef __NetBSD__. Thanks, Thomas --2vy64ret6zgn7wdh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-src_systhread.c" $NetBSD$ Adapt pthread_setname_np calling convention for NetBSD. --- src/systhread.c.orig 2020-01-30 22:42:52.049505198 +0000 +++ src/systhread.c @@ -217,7 +217,11 @@ sys_thread_set_name (const char *name) #ifdef HAVE_PTHREAD_SETNAME_NP_1ARG pthread_setname_np (p_name); #else + #ifdef __NetBSD__ + pthread_setname_np (pthread_self (), "%s", p_name); + #else pthread_setname_np (pthread_self (), p_name); + #endif #endif #endif } --2vy64ret6zgn7wdh--