home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / gcc / ixemulsrc.lha / ixemul / library / create_header.c < prev    next >
C/C++ Source or Header  |  1996-12-11  |  741b  |  21 lines

  1. #define _KERNEL
  2. #include "ixemul.h"
  3. #include <stddef.h>
  4. #include <stdio.h>
  5.  
  6. int main(int argc, char **argv)
  7. {
  8.   printf ("/* This header has been generated by the create_header tool.\n   DO NOT EDIT! */\n\n");
  9.   printf ("/* The size of struct user is %ld bytes. */\n\n", sizeof(struct user));
  10.   printf ("#define P_SIGMASK_OFFSET 0x%x\n\n",
  11.         (unsigned)offsetof (struct user, p_sigmask));
  12.   printf ("#define U_ONSTACK_OFFSET 0x%x\n",
  13.         (unsigned)offsetof (struct user, u_onstack));
  14.   printf ("#define P_FLAG_OFFSET 0x%x\n",
  15.         (unsigned)offsetof (struct user, p_flag));
  16.  
  17.   printf ("#define IXBASE_SIZEOF (IXBASE_C_PRIVATE + %d)\n",
  18.       (int)(sizeof (struct ixemul_base) - offsetof (struct ixemul_base, ix_seg_list) - 4));
  19.   return 0;
  20. }
  21.