]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/i386/host-cygwin.c
Update copyright years.
[thirdparty/gcc.git] / gcc / config / i386 / host-cygwin.c
index ac699b3bf01a2d015eb74767b3f9b0b1c020f1c7..461b9925d155ea4b7c25ce328106e4272af1c008 100644 (file)
@@ -1,5 +1,5 @@
 /* Cygwin host-specific hook definitions.
- Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
 
  This file is part of GCC.
 
  along with GCC; see the file COPYING3.  If not see
  <http://www.gnu.org/licenses/>. */
 
+#define IN_TARGET_CODE 1
+
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include <sys/mman.h>
+#include "diagnostic.h"
 #include "hosthooks.h"
 #include "hosthooks-def.h"
-#include "toplev.h"
-#include "diagnostic.h"
 
 static void * cygwin_gt_pch_get_address (size_t, int fd);
 static size_t cygwin_gt_pch_alloc_granularity (void);
@@ -54,14 +54,14 @@ cygwin_gt_pch_get_address (size_t sz, int fd)
   off_t p = lseek(fd, 0, SEEK_CUR);
 
   if (p == (off_t) -1)
-    fatal_error ("can%'t get position in PCH file: %m");
+    fatal_error (input_location, "can%'t get position in PCH file: %m");
 
    /* Cygwin requires that the underlying file be at least
       as large as the requested mapping.  */
   if ((size_t) p < sz)
   { 
     if ( ftruncate (fd, sz) == -1 )
-      fatal_error ("can%'t extend PCH file: %m");
+      fatal_error (input_location, "can%'t extend PCH file: %m");
   }
 
   base = mmap (NULL, sz, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
@@ -72,7 +72,7 @@ cygwin_gt_pch_get_address (size_t sz, int fd)
     munmap (base, sz);
 
   if (lseek (fd, p, SEEK_SET) == (off_t) -1 )
-    fatal_error ("can%'t set position in PCH file: %m");
+    fatal_error (input_location, "can%'t set position in PCH file: %m");
 
   return base;
 }