Development

OpenLDAP的内存泄漏

| Development

今天发现了OpenLDAP client库的一个内存泄漏(每次连接会漏掉大约80字节),并提交了ITS patch(4441),不过我觉得这里面上锁上的还是有点问题的,至少逻辑不是很清楚。

参与评论

while(0)是干吗的?

| Development

今天 renzhen 同学问起为什么很多宏都定义为 do { something… } while(0),我也顺便温习了一下。

简而言之:如果希望宏表现的和函数接近,就需要这样做。

阅读全文…( 本文约 124 字,阅读大致需要 1 分钟 )

给csh增加了简体中文(GBK)支持

| Development

对GBK的locale做了一些改动,使得其能够提供正确的字符宽度信息了。这样一来,csh就能够正确处理GBK的中文了。昨天还增加了正体(我们叫做繁体)中文对应的locale变化。

阅读全文…( 本文约 119 字,阅读大致需要 1 分钟 )

感动,总算找到LANG等环境的说明了……

| Development

原来是 environ(7),今天看col(1)偶然发现的……

参与评论

Preparing for Simplified Chinese Project Merge

| Development

Will start commit slush soon.

参与评论

Yahoo宣布开放两个UI包的源代码

| Development

本来我对Web开发已经没什么兴趣了,不过这次Yahoo出的还是值得看一看。

第一个是 Yahoo! Design Pattern Library提供了包括拖拽、浏览tab等在内的一系列JS。而第二个,Yahoo! User Interface Library则是一系列AJAX脚本。这些库均采用BSD授权。

阅读全文…( 本文约 137 字,阅读大致需要 1 分钟 )

bsd.port.mk: critical issue for RELENG_6

| Development

Today I have submitted a PR which I have marked “critical”. bsd.port.mk does not do the right thing on RELENG_6 after the rcorder change, which will cause all ports installed rc.d scripts stop to function at system startup.

The PR can be accessed here: http://www.freebsd.org/cgi/query-pr.cgi?pr=93536

UPDATE(20060219): It seems that the problem is not related to this. I am still investigating what was happening.

UPDATE(20060220): Doug Barton has kindly provided information about the issue. It was because some nojail and mountcritlocal conflict. The issue can only appear when you are using jail(8).

参与评论

关于如何扩展复杂且难懂的C代码的一点经验谈

| Development

有时,我们会希望扩展一些现有的C代码。这些代码可能经历了相当久的运行考验——它们至少目前工作起来没有问题——然而,它们可能存在各种各样的问题,比如:

要扩展这类代码是一件有挑战的事情。

阅读全文…( 本文约 705 字,阅读大致需要 2 分钟 )

FreeBSD的uuid处理小问题

| Development

似乎在处理><时,和 DCE 不太一样,改天写个test case看看。


Archived: trackbacks

生成UUID from 2006 Penguin, smashing time! on February 4, 2006 11:36 PM

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <stdio.h>
#include <uuid.h>
main() {
  uuid_t *uuid;
  char *s;
  uuid = (uuid_t*)malloc(sizeof(uuid_t));
  uuidgen(uuid,1);
  uuid_to_string(uuid,&s,NULL);
  printf("%s\\n",s);
}

一个很简单的生成UUID的例子。… Read More

参与评论

FreeBSD 5-STABLE and 6-STABLE frozen for release

| Development

Today we have frozen the RELENG_5 and RELENG_6 branches, for the upcoming 5.5-RELEASE and 6.1-RELEASE. Unfortunately, the www.freebsd.org is not accessable from the mainland China right now.

参与评论