From: Dave on
According to the sysinfo(2) man page, sysinfo() returns a long. But the
header file shows it returning an int.

Is this a bug? If so is the header or man page wrong?



-bash-3.2$ cat /etc/release
Solaris Express Developer Edition 1/08 snv_79b X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 24 January 2008


-bash-3.2$ man sysinfo
Reformatting page. Please Wait... done

System Calls sysinfo(2)

NAME
sysinfo - get and set system information strings

SYNOPSIS
#include <sys/systeminfo.h>

long sysinfo(int command, char *buf, long count);




-bash-3.2$ grep sysinfo /usr/include/sys/systeminfo.h
* Commands to sysinfo(2)
* Values for sysinfo(2) commands are to be assigned by the following
int sysinfo(int, char *, long);
int sysinfo();









From: Ian Collins on
Dave wrote:
> According to the sysinfo(2) man page, sysinfo() returns a long. But the
> header file shows it returning an int.
>
> Is this a bug? If so is the header or man page wrong?
>
I'd file a bug against the man page. The code doesn't lie!

--
Ian Collins.
From: Dave on
Ian Collins wrote:
> Dave wrote:
>> According to the sysinfo(2) man page, sysinfo() returns a long. But the
>> header file shows it returning an int.
>>
>> Is this a bug? If so is the header or man page wrong?
>>
> I'd file a bug against the man page. The code doesn't lie!
>


Cheers, I will do that. I will look up first whether POSIX defines this
as returning a long or int (if it is defined anyway).
From: Dave on
Dave wrote:
> Ian Collins wrote:
>> Dave wrote:
>>> According to the sysinfo(2) man page, sysinfo() returns a long. But the
>>> header file shows it returning an int.
>>>
>>> Is this a bug? If so is the header or man page wrong?
>>>
>> I'd file a bug against the man page. The code doesn't lie!
>>
>
>
> Cheers, I will do that. I will look up first whether POSIX defines this
> as returning a long or int (if it is defined anyway).

I've now done this on the opensolaris bug database. Of course, I have no
idea of a bug id, since one is not generated. That in itself seems a
bug, as it difficult to track bugs when one does not know the bug id.

From: Andrew Gabriel on
In article <48049f97(a)212.67.96.135>,
Dave <foo(a)coo.com> writes:
> Dave wrote:
>> Ian Collins wrote:
>>> Dave wrote:
>>>> According to the sysinfo(2) man page, sysinfo() returns a long. But the
>>>> header file shows it returning an int.
>>>>
>>>> Is this a bug? If so is the header or man page wrong?
>>>>
>>> I'd file a bug against the man page. The code doesn't lie!
>>>
>>
>>
>> Cheers, I will do that. I will look up first whether POSIX defines this
>> as returning a long or int (if it is defined anyway).
>
> I've now done this on the opensolaris bug database. Of course, I have no
> idea of a bug id, since one is not generated. That in itself seems a
> bug, as it difficult to track bugs when one does not know the bug id.

You will be mailed the bugid when it's entered into the bug
database, usually within a day or so.

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]