linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Carlson <carlsonj@workingcode.com>
To: linux-ppp@vger.kernel.org
Subject: Re: [PATCH 4/9] pppd: include time.h before using time_t
Date: Fri, 04 Oct 2019 12:52:12 +0000	[thread overview]
Message-ID: <6fb1fd97-7e97-8088-ef46-2d4003dbd4e6@workingcode.com> (raw)
In-Reply-To: <1569482466-9551-5-git-send-email-dev.kurt@vandijck-laurijssen.be>

On 10/04/19 06:49, Kurt Van Dijck wrote:
>> IMHO time_t is defined in sys/types.h
> 
> http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf
> chapter 7.23.1.3
> 

I believe that covers userland environments, not the kernel.

At least on Solaris (and its derivatives, such as Illumos), the symbols
available in the kernel are defined in sys/ (or net/, netinet/, or
similar for network bits).  The top-level header files are for userland
libraries.  Userland libraries are not accessible within the kernel.

In this case, the common net/ppp_defs.h file is used by both user-level
code (pppd itself) and by several kernel modules.

There may be systems on which including <time.h> within a kernel module
is harmless (I suspect Linux is one), but I have a hard time believing
that it's correct to do so.

Do you know of a system where either (a) <sys/time.h> does not exist or
(b) it exists but does not define 'time_t'?  I haven't been able to find
a system that matches either case.  I tried several flavors of Linux,
AIX, Solaris, HP/UX, and IBM USS on z/OS.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

  parent reply	other threads:[~2019-10-04 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26  7:21 [PATCH 4/9] pppd: include time.h before using time_t Kurt Van Dijck
2019-10-03 22:40 ` Paul Mackerras
2019-10-04  7:06 ` Kurt Van Dijck
2019-10-04  8:22 ` Levente
2019-10-04 10:49 ` Kurt Van Dijck
2019-10-04 12:52 ` James Carlson [this message]
2019-10-04 14:29 ` Kurt Van Dijck
2019-10-04 14:49 ` James Carlson

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=6fb1fd97-7e97-8088-ef46-2d4003dbd4e6@workingcode.com \
    --to=carlsonj@workingcode.com \
    --cc=linux-ppp@vger.kernel.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 NNTP newsgroup(s).