![](https://secure.gravatar.com/avatar/d8110a8a8a97be0803549ea5ee2e638b.jpg?s=120&d=mm&r=g)
21 May
2008
21 May
'08
4:15 p.m.
2008/5/22 Arthur Reutenauer
No; instead of (uname(&uts)) it should be (uname(&uts) < 0) .
Well, no: if the function fails on Linux and returns, say, 1, this test wouldn't catch it. But Taco knows what to do, and the discussion
From uname(2) on Linux: RETURN VALUE On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
And SUS3 has this: Upon successful completion, a non-negative value shall be returned. Otherwise, -1 shall be returned and errno set to indicate the error. Best Martin