Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > M

magic(4)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

magic — magic numbers for HP-UX implementations

SYNOPSIS

#include <magic.h>

DESCRIPTION

The magic.h file localizes all information about HP-UX "magic numbers" in one file, thus facilitating uniform treatment of magic numbers. This file specifies the location of the magic number in a file (always the start of the file) and the structure of the magic number:

struct magic_number { unsigned short system_id; unsigned short file_type; }; typedef struct magic_number MAGIC;

magic.h includes definitions for the system IDs of all HP machines running HP-UX, and file types that are common to all implementations. There may be additional implementation-dependent file types. The predefined file types are:

/* for object code files */ #define RELOC_MAGIC 0x106 /* relocatable only */ #define EXEC_MAGIC 0x107 /* normal executable */ #define SHARE_MAGIC 0x108 /* shared executable */ #define DEMAND_MAGIC 0x10B /* demand-load executable */ #define LISP_MAGIC 0x10C /* compiled Lisp */ #define DL_MAGIC 0x10D /* dynamic load library */ #define SHL_MAGIC 0x10E /* shared library */ #define HPE_MAGIC 0x150 /* HPE boot image */

The values for system_id are defined in model(4).

WARNINGS

Files managed by cpio use a different form of magic number that is incompatible with <magic.h>.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.