affinity-fmt.c 1.7 KB

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