libspectre-0.2.7-ghostscript-9.18-1.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Fixed error namespace for >=ghostscript-gpl-9.18
  2. https://bugs.gentoo.org/563540
  3. --- libspectre-0.2.7/libspectre/spectre-gs.c
  4. +++ libspectre-0.2.7/libspectre/spectre-gs.c
  5. @@ -43,12 +43,12 @@
  6. if (code <= -100) {
  7. switch (code) {
  8. - case e_Fatal:
  9. + case gs_error_Fatal:
  10. fprintf (stderr, "fatal internal error %d", code);
  11. return TRUE;
  12. break;
  13. - case e_ExecStackUnderflow:
  14. + case gs_error_ExecStackUnderflow:
  15. fprintf (stderr, "stack overflow %d", code);
  16. return TRUE;
  17. break;
  18. @@ -109,9 +109,9 @@
  19. set = _spectre_strdup_printf ("%d %d translate\n", -x, -y);
  20. error = gsapi_run_string_continue (ghostscript_instance, set, strlen (set),
  21. 0, &exit_code);
  22. - error = error == e_NeedInput ? 0 : error;
  23. + error = error == gs_error_NeedInput ? 0 : error;
  24. free (set);
  25. - if (error != e_NeedInput && critic_error_code (error)) {
  26. + if (error != gs_error_NeedInput && critic_error_code (error)) {
  27. fclose (fd);
  28. return FALSE;
  29. }
  30. @@ -126,7 +126,7 @@
  31. read = fread (buf, sizeof (char), to_read, fd);
  32. error = gsapi_run_string_continue (ghostscript_instance,
  33. buf, read, 0, &exit_code);
  34. - error = error == e_NeedInput ? 0 : error;
  35. + error = error == gs_error_NeedInput ? 0 : error;
  36. left -= read;
  37. }