Recent CVS; Next 3.3; missing ifdef for munmap in cppfiles.c

James McKelvey mckelvey@fafnir.com
Sat Sep 16 15:13:00 GMT 2000


cppfiles.c references munmap and does not guard it with MMAP_THRESHOLD.  
munmap does not exist on NeXT (and mmap is unusable).

Possible patch:

maskull:/SmaugC/Sources2/gcc/gcc>diff -c cppfiles.c.orig cppfiles.c
*** cppfiles.c.orig     Sat Sep 16 14:54:31 2000
--- cppfiles.c  Sat Sep 16 14:54:57 2000
***************
*** 363,371 ****
--- 363,373 ----
  {
    if (inc->buffer)
      {
+ #if MMAP_THRESHOLD
        if (inc->mapped)
        munmap ((caddr_t) inc->buffer, inc->st.st_size);
        else
+ #endif
        free ((PTR) inc->buffer);
        inc->buffer = NULL;
      }

---
People who cannot relive the past
are condemned to remember it.

Jim McKelvey  mckelvey@maskull.com


More information about the Gcc-bugs mailing list