Penguin

Differences between version 3 and predecessor to the previous major change of accept(2).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 3 Last edited on Tuesday, December 31, 2002 2:45:15 am by PerryLorier Revert
Older page: version 2 Last edited on Monday, October 28, 2002 8:36:04 pm by PerryLorier Revert
@@ -138,5 +138,5 @@
  
 The third argument of __accept__ was originally declared as an `int *' (and is that under libc4 and libc5 and on many other systems like BSD 4.*, SunOS 4, SGI); a POSIX 1003.1g draft standard wanted to change it into a `size_t *', and that is what it is for SunOS 5. Later POSIX drafts have `socklen_t *', and so do the Single Unix Specification and glibc2. Quoting Linus Torvalds: ''_Any_ sane library _must_ have "socklen_t" be the same size as int. Anything else breaks any BSD socket layer stuff. POSIX initially _did_ make it a size_t, and I (and hopefully others, but obviously not too many) complained to them very loudly indeed. Making it a size_t is completely broken, exactly because size_t very seldom is the same size as "int" on 64-bit architectures, for example. And it _has_ to be the same size as "int" because that's what the BSD socket interface is. Anyway, the POSIX people eventually got a clue, and created "socklen_t". They shouldn't have touched it in the first place, but once they did they felt it had to have a named type for some unfathomable reason (probably somebody didn't like losing face over having done the original stupid thing, so they silently just renamed their blunder).'' 
 !!SEE ALSO 
  
-bind(2), connect(2), listen(2), select(2), socket(2) 
+bind(2), connect(2), listen(2), select(2), socket(2), CategorySocketSysCalls  
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.