To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=76159





------- Additional comments from [EMAIL PROTECTED] Wed Apr 11 15:22:22 +0000 
2007 -------
ericb->sb

>1  Can we get this sorted out definitively?  What platform behaves in what way?

I would like too, and I'll try to answer precisely :)  


>1.0  Standard platforms have _SC_GETPW_R_SIZE_MAX defined in unistd.h, and
>sysconf(_SC_GETPW_R_SIZE_MAX) either (a) returns a non-negative value or (b)
>returns -1 and leaves errno unchanged.  Does any FreeBSD or OS X version fall 
>in
>this category?

Mac OS X 10.4 aka Tiger  :

- has  _SC_GETPW_R_SIZE_MAX defined in unistd.h 
- sysconf(_SC_GETPW_R_SIZE_MAX) returns -1
- leaves errno unchanged ( returns 0 )

Sorry, no idea for FreeBSD.  maho, jkim ? 


>1.2  Allegedly, some platforms have _SC_GETPW_R_SIZE_MAX defined in unistd.h,
>but sysconf(_SC_GETPW_R_SIZE_MAX) returns -1 and sets errno=EINVAL.  Is that
>really true?  Does any FreeBSD or OS X version fall in this category?

Mac OS X 10.3 aka Panther has not  _SC_GETPW_R_SIZE_MAX defined in unistd.h, 
but we used 71 until 
now, in issue #i64769# , and nobody cried.

So once we admit  _SC_GETPW_R_SIZE_MAX is equal to 71 , 

- sysconf(_SC_GETPW_R_SIZE_MAX) returns -1
- errno returns 22 ( EINVAL)  on Mac OS X 10.3 aka Panther


>2  In your little program
>http://eric.bachard.free.fr/mac/i76159/sysconfreturn.c, you should add an
>explicit "errno=0;" before the call to sysconf, just to be safe.

Thanks for the hint. The result is no change in both Panther and Tiger.

>3  In i76159_new_Implsec_macosx2.diff,
>+enum Result { KNOWN=0, UNKNOWN=1, ERROR=2 };
>  +typedef short Result;

>is bad and should really be
> +enum Result { KNOWN, UNKNOWN, ERROR };

Don't know the mistake I did, because it does not work without the typedef : I 
got a parser error on 
both Mac OS X 10.4 and 10.3, no type is defined for Result, and Result is 
casted in "int" with a warning. 

That's the reason why I defined a type like short (better idea than short ?)

If I replace the previous part with : 

+enum Result { KNOWN, UNKNOWN, ERROR };
+typedef short Result;

I have no problem verified ok on Mac OS X Panther and Tiger.

BTW : shouldn't n be intialized too, no ? (got a warning )


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to