Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Thomas Klausner <tk@giga.or.at>, Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: portability: types
Date: Fri, 26 Feb 2016 09:45:56 +0100	[thread overview]
Message-ID: <56D010C4.3000804@ladisch.de> (raw)
In-Reply-To: <20160225233124.GA13672@danbala.tuwien.ac.at>

Thomas Klausner wrote:
> The next big issue is that multiple places include Linux specific
> header files, easily recognizable by the path linux/*.h.

Once upon a time, alsa-lib was used only on Linux (and also on old
versions such as 2.2.x).

> I think these are used to define unusual types like __u32, __u64,
> __kernel_off_t, __kernel_pid_t. There are also a number of cases of
> u_xxx_t (which don't exist on Solaris) vs. the uxxx_t defined in C99.
>
> Many of these types have POSIX equivalents, like uint32_t, uint64_t,
> off_t, pid_t.
>
> Would it be better to switch to those, or should we define compat
> #typedefs or #defines in local.h?

Linux-specific types should be used only in code that actually is
Linux specific (i.e., the xxx_hw plugins).


Regards,
Clemens

  reply	other threads:[~2016-02-26  8:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 15:47 feeding back pkgsrc changs Thomas Klausner
2016-02-18 15:51 ` Takashi Iwai
2016-02-23 14:09   ` portability patch: EBADF [was Re: feeding back pkgsrc changs] Thomas Klausner
2016-02-23 15:53     ` Takashi Iwai
2016-02-24 13:16       ` Thomas Klausner
2016-02-24 15:36         ` Takashi Iwai
2016-02-25 23:31           ` portability: types Thomas Klausner
2016-02-26  8:45             ` Clemens Ladisch [this message]
2016-02-29 15:05               ` [PATCH 1/3] Use POSIX uint*_t instead of u_int*_t Thomas Klausner
2016-02-29 15:05                 ` [PATCH 2/3] Use pid_t, off_t instead of __kernel_*_t for better portability Thomas Klausner
2016-02-29 16:10                   ` Takashi Iwai
2016-03-02 22:14                     ` [PATCH] define more missing types for non-Linux Thomas Klausner
2016-03-03  9:32                       ` Takashi Iwai
2016-03-03  9:50                         ` Thomas Klausner
2016-03-03  9:53                           ` Takashi Iwai
2016-03-03  9:55                             ` Takashi Iwai
2016-03-03  9:58                               ` Thomas Klausner
2016-03-03 10:01                                 ` Takashi Iwai
2016-03-03 10:10                                   ` byteswap.h Thomas Klausner
2016-03-03 10:21                                     ` byteswap.h Takashi Iwai
2016-03-03 11:18                                       ` byteswap.h Thomas Klausner
2016-03-03 11:37                                         ` byteswap.h Takashi Iwai
2016-03-03 11:39                                           ` byteswap.h Thomas Klausner
2016-03-03 12:02                                             ` Remaining compatibility patches for NetBSD Thomas Klausner
2016-03-03 13:35                                               ` Takashi Iwai
2016-03-03 13:46                                                 ` Thomas Klausner
2016-03-03 13:54                                                   ` Takashi Iwai
2016-03-03 14:23                                                     ` Thomas Klausner
2016-02-29 15:05                 ` [PATCH 3/3] Use uint*_t instead of __le* Thomas Klausner
2016-02-29 15:10                   ` [PATCH 4/4] Replace __u* with uint*_t Thomas Klausner

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=56D010C4.3000804@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    --cc=tk@giga.or.at \
    /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