Ticket #322: single_shared.diff

File single_shared.diff, 2.2 KB (added by KO Myung-Hun, 10 years ago)

patch for single shared

  • src/emx/src/emxbind/emxbind.c

    diff --git a/src/emx/src/emxbind/emxbind.c b/src/emx/src/emxbind/emxbind.c
    index d3ac49c..f37c434 100755
    a b static int md_callback (struct _md *md, const _md_stmt *stmt, _md_token token,  
    117117      break;
    118118
    119119    case _MD_DATA:
    120       def_ignored ("DATA");
     120      if (stmt->segment.attr & (_MDS_MULTIPLE | _MDS_NONSHARED))
     121        data_shared = FALSE;
     122
     123      if (stmt->segment.attr & (_MDS_SINGLE | _MDS_SHARED))
     124        data_shared = TRUE;
    121125      break;
    122126
    123127    case _MD_DESCRIPTION:
  • src/emx/src/emxbind/emxbind.h

    diff --git a/src/emx/src/emxbind/emxbind.h b/src/emx/src/emxbind/emxbind.h
    index ff72c05..9ffb801 100755
    a b EXTERN int term_global INIT (TRUE);  
    229229
    230230EXTERN char *description INIT (NULL);
    231231
     232/* DATA attributes, MULTIPLE NONSHARED and SINGLE SHARED. */
     233
     234EXTERN int data_shared INIT (FALSE);
     235
    232236/* The emx options for DOS and OS/2, respectively, are stored in these
    233237   buffers, before being written to the emxbind headers. */
    234238
  • src/emx/src/emxbind/exec.c

    diff --git a/src/emx/src/emxbind/exec.c b/src/emx/src/emxbind/exec.c
    index 408c850..a86850e 100755
    a b void init_os2_header (void)  
    665665  obj_data.virt_size  = 0;
    666666  obj_data.virt_base  = 0;
    667667  obj_data.attr_flags = 0x2003;       /* readable, writable, big */
     668  if (data_shared)
     669    obj_data.attr_flags |= 0x20;      /* shared */
    668670  obj_data.map_first  = X;
    669671  obj_data.map_count  = X;
    670672  obj_data.reserved   = 0;
  • src/emx/src/emxomf/emxomfld.c

    diff --git a/src/emx/src/emxomf/emxomfld.c b/src/emx/src/emxomf/emxomfld.c
    index e73cc11..3e756e4 100755
    a b static int def_2_watcom(struct _md *md, const _md_stmt *stmt, _md_token token, v  
    12951295        break;
    12961296
    12971297      case _MD_DATA:
     1298        if (stmt->segment.attr & (_MDS_MULTIPLE | _MDS_NONSHARED))
     1299          fprintf (response_file, "OPTION MANYAUTODATA\n");
     1300
     1301        if (stmt->segment.attr & (_MDS_SINGLE | _MDS_SHARED))
     1302          fprintf (response_file, "OPTION ONEAUTODATA\n");
    12981303        break;
    12991304
    13001305      case _MD_DESCRIPTION: