From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/728 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: [0/3] _BSD_SOURCE patches: termios, ctype, stdio Date: Thu, 19 Apr 2012 13:52:45 -0700 Message-ID: <20120419135245.6f617c6c@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1334868787 23066 80.91.229.3 (19 Apr 2012 20:53:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2012 20:53:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-729-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 19 22:53:03 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SKyLd-000439-TM for gllmg-musl@plane.gmane.org; Thu, 19 Apr 2012 22:53:02 +0200 Original-Received: (qmail 19867 invoked by uid 550); 19 Apr 2012 20:53:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19848 invoked from network); 19 Apr 2012 20:53:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=VRc4XlcYM1v2GTEw/M09JxB0u+XjKWlfZJ9OQCX3qFt8tkF7vsJqGuv2BoT/saSWz2KS7SsqBC/S1qYf2fQhc3ytwrPvVhAt6QMDlX6yWhx38S9Z4xO3HeALSNVAGBDIz6EEFPUw1XndAPEM7q4fk70VlmpEWglztrZdiwpf56Y=; h=Date:From:To:Subject:Message-ID:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:728 Archived-At: 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