Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120419135245.6f617c6c@newbook>
Date: Thu, 19 Apr 2012 13:52:45 -0700
From: Isaac Dunham <idunham@...abit.com>
To: musl@...ts.openwall.com
Subject: [0/3] _BSD_SOURCE patches: termios, ctype, stdio

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.