Hi Josh,
> There is no "standard Tcl ‘sysctl’ call". The sysctl proc you can call
> from portfiles is defined in src/macports1.0/sysctl.c. It's just a thin
> wrapper around sysctlbyname(3) to make it available from Tcl.
[…]
>> but this code in Macports:
>>
>> if {![catch {sysctl hw.machine} result]} {
>> set native_arch ${result}
>> puts ${result}
>> }
>>
>> reports ‘32767’
>>
>> How come?
>
> Probably because someone (cough) only implemented support for
> CTLTYPE_INT and CTLTYPE_QUAD in the function...
Okay :) I’ll modify the Portfile so it reads
catch {exec sysctl -n …}
which works. BTW, “Macports sysctl” does not handle any options, so “sysctl -n
…” returns “wrong number of args”.
Thanks Josh!
Vincent
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev