mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Isaac Dunham <idunham@lavabit.com>
To: musl@lists.openwall.com
Subject: [0/3] _BSD_SOURCE patches: termios, ctype, stdio
Date: Thu, 19 Apr 2012 13:52:45 -0700	[thread overview]
Message-ID: <20120419135245.6f617c6c@newbook> (raw)

I've gotten _BSD_SOURCE macros ready for termios.h, ctype.h, and
stdio.h
For termios.h, there properly should be the CCEQ macro
(#if (_BSD_SOURCE||_GNU_SOURCE) ).
This is a one-line convenience macro, whether you look in the *BSD
headers or glibc.
 /* Compare a character C to a value VAL from the `c_cc'array in a 
`struct termios'.  If VAL is _POSIX_VDISABLE, no character
can match it.  */
But _POSIX_VDISABLE is not defined here, so I have left it
unimplemented.

 By my estimate, there are about 33 headers left:
grepping through the glibc headers equivalent to ones in musl 
gives a total of 42 headers with __USE_{MISC,BSD}, I've done unistd.h,
math.h, and string.h, strings.h is likewise done, features.h is
irrelevant...
glibc regex.h implements two obsolete but much simpler interfaces,
from BSD:
re_comp(char *regex) and re_exec(char *string)
These are much simpler to use than the standard interface, but the
design has its defects: re_comp allocates a static buffer, which
re_exec overwrites on search.  I assume that these will not be
implemented?  If so, that's a third one where there's nothing to do.

Headers remaining:
include/arpa/inet.h 1
include/{signal.h,stdlib.h,fcntl.h,tgmath.h,glob.h,setjmp.h,mntent.h, 
  dirent.h,time.h,shadow.h,pwd.h,utmp.h,netdb.h,ftw.h,endian.h,grp.h} 16
include/sys/{syslog.h,select.h,wait.h,time.h, 
  socket.h,un.h,uio.h,mman.h,types.h,stat.h}  10
include/netinet/{ip.h,tcp.h,ip_icmp.h,in.h,if_ether.h} 5
/usr/include/net/if.h 1

Isaac Dunham



             reply	other threads:[~2012-04-19 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 20:52 Isaac Dunham [this message]
2012-04-19 21:01 ` [1/3] _BSD_SOURCE for stdio.h Isaac Dunham
2012-04-19 21:03 ` [0/3] _BSD_SOURCE patches: termios, ctype, stdio Isaac Dunham
2012-04-19 21:06 ` [3/3] _BSD_SOURCE for ctype.h Isaac Dunham

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=20120419135245.6f617c6c@newbook \
    --to=idunham@lavabit.com \
    --cc=musl@lists.openwall.com \
    /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 public inbox

	https://git.vuxu.org/mirror/musl/

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).