Ticket #21335: emacs-snow-leopard.patch

File emacs-snow-leopard.patch, 4.0 KB (added by d.mcdougall@…, 15 years ago)
  • configure

    diff -u -r ../emacs-22.3.org/configure ./configure
    old new  
    1548615486__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
    1548715487sendto recvfrom getsockopt setsockopt getsockname getpeername \
    1548815488gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
    15489 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
     15489memset memcmp difftime memcpy mempcpy mblen mbrlen
    1549015490do
    1549115491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    1549215492{ echo "$as_me:$LINENO: checking for $ac_func" >&5
  • configure.in

    diff -u -r ../emacs-22.3.org/configure.in ./configure.in
    old new  
    26282628__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
    26292629sendto recvfrom getsockopt setsockopt getsockname getpeername \
    26302630gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
    2631 memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign)
     2631memset memcmp difftime memcpy mempcpy mblen mbrlen)
    26322632
    26332633AC_CHECK_HEADERS(sys/un.h)
    26342634
  • src/s/darwin.h

    diff -u -r ../emacs-22.3.org/src/s/darwin.h ./src/s/darwin.h
    old new  
    260260/* Definitions for how to compile & link.  */
    261261
    262262/* Indicate that we are compiling for Mac OS X.  */
    263 #define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
     263/* #define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX */
     264#define C_SWITCH_SYSTEM -DMAC_OSX
    264265
    265266#ifdef HAVE_CARBON
    266267
  • src/unexmacosx.c

    diff -u -r ../emacs-22.3.org/src/unexmacosx.c ./src/unexmacosx.c
    old new  
    584584      printf ("LC_UUID          ");
    585585      break;
    586586#endif
     587#ifdef LC_DYLD_INFO
     588    case LC_DYLD_INFO:
     589      printf ("LC_DYLD_INFO     ");
     590      break;
     591    case LC_DYLD_INFO_ONLY:
     592      printf ("LC_DYLD_INFO_ONLY");
     593      break;
     594#endif
    587595    default:
    588596      printf ("unknown          ");
    589597    }
     
    821829               || strncmp (sectp->sectname, "__const", 16) == 0
    822830               || strncmp (sectp->sectname, "__cfstring", 16) == 0
    823831               || strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
     832               || strncmp (sectp->sectname, "__program_vars", 16) == 0
    824833               || strncmp (sectp->sectname, "__objc_", 7) == 0)
    825834        {
    826835          if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
     
    10881097  curr_header_offset += lc->cmdsize;
    10891098}
    10901099
     1100#ifdef LC_DYLD_INFO
     1101/* Copy a LC_DYLD_INFO(_ONLY) load command from the input file to the output
     1102   file, adjusting the file offset fields.  */
     1103static void
     1104copy_dyld_info (struct load_command *lc, long delta)
     1105{
     1106  struct dyld_info_command *dip = (struct dyld_info_command *) lc;
     1107
     1108  if (dip->rebase_off > 0)
     1109    dip->rebase_off += delta;
     1110  if (dip->bind_off > 0)
     1111    dip->bind_off += delta;
     1112  if (dip->weak_bind_off > 0)
     1113    dip->weak_bind_off += delta;
     1114  if (dip->lazy_bind_off > 0)
     1115    dip->lazy_bind_off += delta;
     1116  if (dip->export_off > 0)
     1117    dip->export_off += delta;
     1118
     1119  printf ("Writing ");
     1120  print_load_command_name (lc->cmd);
     1121  printf (" command\n");
     1122
     1123  if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
     1124    unexec_error ("cannot write dyld info command to header");
     1125
     1126  curr_header_offset += lc->cmdsize;
     1127}
     1128#endif
     1129
    10911130/* Copy other kinds of load commands from the input file to the output
    10921131   file, ones that do not require adjustments of file offsets.  */
    10931132static void
     
    11541193      case LC_TWOLEVEL_HINTS:
    11551194        copy_twolevelhints (lca[i], linkedit_delta);
    11561195        break;
     1196#ifdef LC_DYLD_INFO
     1197      case LC_DYLD_INFO:
     1198      case LC_DYLD_INFO_ONLY:
     1199        copy_dyld_info (lca[i], linkedit_delta);
     1200        break;
     1201#endif
    11571202      default:
    11581203        copy_other (lca[i]);
    11591204        break;
     
    13201365void
    13211366unexec_free (void *ptr)
    13221367{
     1368  if (ptr == NULL)
     1369    return;
    13231370  if (in_dumped_exec)
    13241371    {
    13251372      if (!ptr_in_unexec_regions (ptr))