关于glibc与BSD libc的比较

这篇博客探讨了glibc和BSD libc在Unix-like系统中的差异,主要关注它们的分配、扩展、字符处理、标准兼容性和对齐方式等方面。由于信息较旧,仅作参考,实际跨平台开发时需调查最新情况,决定是移植还是重新实现功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

unix-ilke系统真的是百家争鸣。之前知道很多很多不同的发行版。也曾经因为在solaris下做过一些开发,从而接触过BSD体系的皮毛。最近一直在做Android下的开发,稍微关注了一下其中的Bionic,一如google申明的它是植根于BSD的libc体系的。因为大部分的工作都是使用glibc进行开发,处于好奇关注了下两者的区别。


以下内容是从一个邮件组里面所引用,因为是比较老的信息,只能作为参考。如果需要做port的考量或者做搭建新系统的考量,一定还得对没项的最新情况进行调查。


总体而言,两者针对的平台体系不太一样,或多或少会有一些底层interface的差别。对我们大部分的开发者而言,是在某一平台体系下开发时,如果需要用到其它体系下有的好的功能或者interface,就需要查找考量是做porting还是应该从头实现!!

glibc vs BSD libc

http://lists.debian.org/debian-bsd/2003/01/msg00013.html


Why is it important for debian BSD to sum up the differences in BSD libc and glibc?
What I have learned from this thread (and from porting apps from linux to NetBSD and Solaris):

- there are differences between the libcs of these systems.
- sometimes they hurt during ports, most of the time, they don´t hurt
- the dominance of glibc-based linux has forced IBM and SUN to supply linux programming
  interfaces. This might happen in the BSD world in the future.
- for the debian/BSD project on the sparc it seems to be better to stick to BSD libc
  (we keep in track with alpha and intel ports)

So, coming back to the main topic: how did the NetBSD/intel people overcome these difficulties
caused by bsd libc/glibc?


1.
License
glibc :LGPL License
BSD libc:BSD

2.
glibc support for standards
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值