The Memory Management Utilities data type MachineLocation contains information about the geographical location of a computer. The ReadLocation and WriteLocation functions use the geographic location record to read and store the geographic location and time zone information in extended parameter RAM.
If your code uses the MachineLocation data structure, you need to change it to use the MachineLocation.u.dls.Delta field that was added to the structure in Mac OS X version 10.0.
To be endian-safe, change code that uses the old field:
MachineLocation.u.dlsDelta = 1; |
to use the new field:
MachineLocation.u.dls.Delta = 1; |
The gmtDelta field remains the sameāthe low 24 bits are used. The order of assignment is important. The following is incorrect because it overwrites results:
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAAGGGGGG; G=Garbage |
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB; |
This is the correct way to assign the values:
MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBB; |
MachineLocation.u.dls.Delta = 0xAA; // u = 0xAABBBBBB; |
For more details see Memory Management Utilities Reference.
Last updated: 2007-02-26