NCL-6.6.2_fix-GCC-10.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f.orig 2019-02-28 00:44:39.000000000 +0100
  2. +++ ncl-6.6.2/ncarg2d/src/libncarg_gks/bwi/argb2ci.f 2020-11-13 16:00:28.210743708 +0100
  3. @@ -16,10 +16,10 @@
  4. integer index, nearest
  5. integer i
  6. integer ARGBMASK, RMASK, GMASK, BMASK
  7. - parameter (ARGBMASK = Z'40000000')
  8. - parameter (RMASK = Z'00FF0000')
  9. - parameter (GMASK = Z'0000FF00')
  10. - parameter (BMASK = Z'000000FF')
  11. + parameter (ARGBMASK = int(Z'40000000'))
  12. + parameter (RMASK = int(Z'00FF0000'))
  13. + parameter (GMASK = int(Z'0000FF00'))
  14. + parameter (BMASK = int(Z'000000FF'))
  15. real r, g, b, dist, mindist
  16. if (iand(index, ARGBMASK).eq.0) then
  17. @@ -31,8 +31,8 @@
  18. mindist = 2e31
  19. nearest = 0
  20. do i=1,mol
  21. - r = (iand(index, RMASK) / Z'0000FFFF') / 255.
  22. - g = (iand(index, GMASK) / Z'000000FF') / 255.
  23. + r = (iand(index, RMASK) / int(Z'0000FFFF')) / 255.
  24. + g = (iand(index, GMASK) / int(Z'000000FF')) / 255.
  25. b = (iand(index, BMASK)) / 255.
  26. C we don't need absolute distance, so forego the sqrt operation...
  27. --- ncl-6.6.2/ni/src/ncl/NclApi.c 2019-02-28 00:44:39.000000000 +0100
  28. +++ NclApi.c 2020-11-16 11:36:39.493087113 +0100
  29. @@ -140,9 +140,9 @@
  30. extern char *the_input_buffer_ptr;
  31. extern int the_input_buffer_size;
  32. -FILE *thefptr;
  33. -FILE *theoptr;
  34. -int cmd_line;
  35. +extern FILE *thefptr;
  36. +extern FILE *theoptr;
  37. +extern int cmd_line;
  38. extern int cur_line_number;
  39. extern char *cur_line_text;
  40. extern int cur_line_maxsize;
  41. --- ncl-6.6.2/ni/src/ncl/NclNewHDF5.c 2019-02-28 00:44:39.000000000 +0100
  42. +++ NclNewHDF5.c 2020-11-16 11:38:28.137952623 +0100
  43. @@ -82,7 +82,7 @@
  44. #define NUMPOSDIMNAMES 6
  45. -NclQuark possibleDimNames[NUMPOSDIMNAMES];
  46. +extern NclQuark possibleDimNames[NUMPOSDIMNAMES];
  47. #ifndef FALSE
  48. #define FALSE 0