all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Ashish SHUKLA <ashish.is@lostca.se>, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix build error in terminal.c on FreeBSD
Date: Sun, 13 Sep 2015 11:59:13 -0700	[thread overview]
Message-ID: <55F5C781.5040700@cs.ucla.edu> (raw)
In-Reply-To: <86k2ruyzve.fsf@chateau.d.if>

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

Thanks for the heads-up.  I installed the attached patch instead, as that should 
be better if the Linux console emulation in FreeBSD ever adds support for 
Unicode characters.  Please give it a try.

[-- Attachment #2: 0001-Port-Unicode-char-detection-to-FreeBSD-svgalib.patch --]
[-- Type: text/plain, Size: 2119 bytes --]

From 4fa35ef03774367a7a776208f04d420af3506ab7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 13 Sep 2015 11:55:28 -0700
Subject: [PATCH] Port Unicode char detection to FreeBSD+svgalib
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Ashish SHUKLA in:
http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00531.html
* configure.ac: Check for struct unipair.unicode instead of for
<linux/kd.h>, since that’s more specific to what the code actually needs.
* src/terminal.c: Use HAVE_STRUCT_UNIPAIR_UNICODE, not HAVE_LINUX_KD_H.
---
 configure.ac   | 3 ++-
 src/terminal.c | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index cd828de..f86d29e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1582,7 +1582,6 @@ fi
 
 dnl checks for header files
 AC_CHECK_HEADERS_ONCE(
-  linux/kd.h
   sys/systeminfo.h
   sys/sysinfo.h
   coff.h pty.h
@@ -3999,6 +3998,8 @@ AC_SUBST(KRB4LIB)
 
 AC_CHECK_HEADERS(valgrind/valgrind.h)
 
+AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
+
 AC_CHECK_FUNCS_ONCE(tzset)
 
 ok_so_far=yes
diff --git a/src/terminal.c b/src/terminal.c
index d7c16d9..80c6aa2 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -28,7 +28,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "coding.h"
 #include "keyboard.h"
 
-#ifdef HAVE_LINUX_KD_H
+#if HAVE_STRUCT_UNIPAIR_UNICODE
 # include <errno.h>
 # include <linux/kd.h>
 # include <sys/ioctl.h>
@@ -532,7 +532,7 @@ selected frame's terminal).  */)
   return store_terminal_param (decode_live_terminal (terminal), parameter, value);
 }
 
-#if HAVE_LINUX_KD_H
+#if HAVE_STRUCT_UNIPAIR_UNICODE
 
 /* Compute the glyph code table for T.  */
 
@@ -575,7 +575,7 @@ calculate_glyph_code_table (struct terminal *t)
 Lisp_Object
 terminal_glyph_code (struct terminal *t, int ch)
 {
-#if HAVE_LINUX_KD_H
+#if HAVE_STRUCT_UNIPAIR_UNICODE
   if (t->type == output_termcap)
     {
       /* As a hack, recompute the table when CH is the maximum
-- 
2.1.4


  reply	other threads:[~2015-09-13 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 17:48 [PATCH] Fix build error in terminal.c on FreeBSD Ashish SHUKLA
2015-09-13 18:59 ` Paul Eggert [this message]
2015-09-13 20:32   ` Ashish SHUKLA

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F5C781.5040700@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=ashish.is@lostca.se \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.