|
From: | Ognyan Kulev |
Subject: | Re: Bug#187391: PortingIssues sockaddr_un |
Date: | Mon, 14 Apr 2003 01:35:11 +0300 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030327 Debian/1.3-4 |
Niels Möller wrote:
Interesting, I didn't know linux had this silly limit. I've tried with the below test program, which avoids the use of SUN_LEN, and which demonstrates that NUL-termination is redundant, and that length up to 108 works fine.
Yes, you either terminate sun_path with NUL and calculate the size with SUN_LEN, or you don't terminate it with NUL and calculate it yourself.
Using SUN_LEN is convenient for constant file names, and the latter approach can be used for the alloca thing where you know the exact size. I just find "always use SUN_LEN" more convenient to remember :-)
Regards -- Ognyan Kulev <ogi@fmi.uni-sofia.bg>, "\"Programmer\""
[Prev in Thread] | Current Thread | [Next in Thread] |