Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Machine Location Data Structure

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.



< Previous PageNext Page > Hide TOC


Last updated: 2007-02-26




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice