1 /* Copyright (C) 2018-2021 Free Software Foundation, Inc. 2 3 This file is part of the GNU Offloading and Multi Processing Library 4 (libgomp). 5 6 Libgomp is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3, or (at your option) 9 any later version. 10 11 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 more details. 15 16 Under Section 7 of GPL version 3, you are granted additional 17 permissions described in the GCC Runtime Library Exception, version 18 3.1, as published by the Free Software Foundation. 19 20 You should have received a copy of the GNU General Public License and 21 a copy of the GCC Runtime Library Exception along with this program; 22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 <http://www.gnu.org/licenses/>. */ 24 25 #include "libgomp.h" 26 #include <string.h> 27 #include <stdio.h> 28 #include <stdlib.h> 29 #ifdef HAVE_UNISTD_H 30 #include <unistd.h> 31 #endif 32 #ifdef HAVE_INTTYPES_H 33 # include <inttypes.h> /* For PRIx64. */ 34 #endif 35 #ifdef HAVE_UNAME 36 #include <sys/utsname.h> 37 #endif 38 39 /* The HAVE_GETPID and HAVE_GETHOSTNAME configure tests are passing for nvptx, 40 while the nvptx newlib implementation does not support those functions. 41 Override the configure test results here. */ 42 #undef HAVE_GETPID 43 #undef HAVE_GETHOSTNAME 44 45 /* The GCN newlib implementation does not support fwrite, but it does support 46 write. Map fwrite to write. */ 47 #undef fwrite 48 #define fwrite(ptr, size, nmemb, stream) write (1, (ptr), (nmemb) * (size)) 49 50 #include "../../affinity-fmt.c" 51 52