public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nico Schottelius <nicos@pcsystems.de>
To: mj@atrey.karlin.mff.cuni.cz,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH]: problem: pc_keyb.h
Date: Fri, 31 Aug 2001 21:23:23 +0200	[thread overview]
Message-ID: <3B8FE42B.23804609@pcsystems.de> (raw)

Hello Martin!

Why can't I include pc_keyb.h directtly into a C program ?
I need that for a part of GPM.

nico@flapp:~/computer/programming/c/test > gcc pc_keyb.h.c
In file included from pc_keyb.h.c:3:
/usr/include/linux/pc_keyb.h:127: parse error before `wait_queue_head_t'

/usr/include/linux/pc_keyb.h:127: warning: no semicolon at end of struct
or union
/usr/include/linux/pc_keyb.h:130: parse error before `}'

When adding

#define wait_queue_head_t     struct wait_queue *

(stolen from compatmac.h)

before including pc_keyb.h it runs fine.

So I suggest the following:

================================================
flapp:/usr/include/linux # diff -u compatmac.h.orig compatmac.h


-- compatmac.h.orig    Fri Aug 31 13:14:38 2001

+++ compatmac.h Fri Aug 31 13:14:50 2001

@@ -151,7 +151,6 @@

 #ifndef TWO_THREE

 /* These are new in 2.3. The source now uses 2.3 syntax, and
here is

    the compatibility define... */

-#define wait_queue_head_t     struct wait_queue
*

 #define DECLARE_MUTEX(name)   struct semaphore name
= MUTEX

 #define DECLARE_WAITQUEUE(wait, current) \


struct wait_queue wait = { current, NULL }

================================================
and

================================================
flapp:/usr/include/linux # diff -u pc_keyb.h.orig pc_keyb.h
--- pc_keyb.h.orig      Fri Aug 31 13:15:31 2001
+++ pc_keyb.h   Fri Aug 31 13:15:40 2001
@@ -121,6 +121,8 @@
                                           but then the read function
would need
                                           a lock etc - ick */

+#define wait_queue_head_t     struct wait_queue *
+
 struct aux_queue {
        unsigned long head;
        unsigned long tail;

==================================================


Nico


             reply	other threads:[~2001-08-31 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-31 19:23 Nico Schottelius [this message]
2001-08-31 19:30 ` [PATCH]: problem: pc_keyb.h Martin Mares
2001-09-02 21:06   ` Nico Schottelius
2001-09-05  8:40     ` Martin Mares
2001-09-05 13:47       ` Nico Schottelius

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=3B8FE42B.23804609@pcsystems.de \
    --to=nicos@pcsystems.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mj@atrey.karlin.mff.cuni.cz \
    /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