+1  A: 
typedef enum {
    TerminalSaveOptionsYes = 'yes ' /* Save the file. */,
    TerminalSaveOptionsNo = 'no  '  /* Do not save the file. */,
    TerminalSaveOptionsAsk = 'ask ' /* Ask the user whether or not to save the file. */
} TerminalSaveOptions;

enum does not name string constants; it names int constants. Each of these names is of an int value.

So, try packing as a or I instead. Or, do both: Pack as a, then unpack as I and pass that number.

Peter Hosey
Yes, that turns out to be the right direction. TerminalSaveOptions is an OSValue which is a Big-endian long. pack("N", 'no ') works a treat!
Gavin Brock