windows-misc.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --- contrib/tools/bison/lib/gethrxtime.c (index)
  2. +++ contrib/tools/bison/lib/gethrxtime.c (working tree)
  3. @@ -24,7 +24,6 @@
  4. #if ! (HAVE_ARITHMETIC_HRTIME_T && HAVE_DECL_GETHRTIME)
  5. -#include <sys/time.h>
  6. #include "timespec.h"
  7. /* Get the current time, as a count of the number of nanoseconds since
  8. @@ -63,7 +62,7 @@ gethrxtime (void)
  9. clock that might jump backwards, since it's the best we can do. */
  10. {
  11. struct timespec ts;
  12. - gettime (&ts);
  13. + timespec_get(&ts, TIME_UTC);
  14. return xtime_make (ts.tv_sec, ts.tv_nsec);
  15. }
  16. # endif
  17. --- contrib/tools/bison/lib/timevar.c (index)
  18. +++ contrib/tools/bison/lib/timevar.c (working tree)
  19. @@ -26,9 +26,6 @@
  20. #include <stdio.h>
  21. #include <stdlib.h>
  22. #include <string.h>
  23. -#include <sys/resource.h>
  24. -#include <sys/time.h>
  25. -#include <sys/times.h>
  26. #include "gethrxtime.h"
  27. #include "gettext.h"
  28. @@ -101,7 +101,7 @@ set_to_current_time (struct timevar_time_def *now)
  29. if (!timevar_enabled)
  30. return;
  31. -
  32. + /*
  33. struct rusage self;
  34. getrusage (RUSAGE_SELF, &self);
  35. struct rusage chld;
  36. @@ -114,7 +114,7 @@ set_to_current_time (struct timevar_time_def *now)
  37. now->sys =
  38. xtime_make (self.ru_stime.tv_sec + chld.ru_stime.tv_sec,
  39. (self.ru_stime.tv_usec + chld.ru_stime.tv_usec) * 1000);
  40. -
  41. + */
  42. now->wall = gethrxtime();
  43. }
  44. --- contrib/tools/bison/lib/strverscmp.c (index)
  45. +++ contrib/tools/bison/lib/strverscmp.c (working tree)
  46. @@ -17,11 +17,7 @@
  47. License along with the GNU C Library; if not, see
  48. <https://www.gnu.org/licenses/>. */
  49. -#ifndef _LIBC
  50. -# include <libc-config.h>
  51. -# define __strverscmp strverscmp
  52. -#endif
  53. #include <stdint.h>
  54. #include <string.h>
  55. #include <ctype.h>
  56. --- contrib/tools/bison/lib/setlocale_null.c (index)
  57. +++ contrib/tools/bison/lib/setlocale_null.c (working tree)
  58. @@ -379,7 +379,9 @@ setlocale_null (int category)
  59. case LC_TIME: i = LC_TIME_INDEX; break;
  60. case LC_COLLATE: i = LC_COLLATE_INDEX; break;
  61. case LC_MONETARY: i = LC_MONETARY_INDEX; break;
  62. +# ifdef LC_MESSAGES
  63. case LC_MESSAGES: i = LC_MESSAGES_INDEX; break;
  64. +# endif
  65. # ifdef LC_PAPER
  66. case LC_PAPER: i = LC_PAPER_INDEX; break;
  67. # endif
  68. --- contrib/tools/bison/lib/strverscmp.c (index)
  69. +++ contrib/tools/bison/lib/strverscmp.c (working tree)
  70. @@ -39,6 +40,10 @@
  71. equal to or greater than S2 (for more info, see the texinfo doc).
  72. */
  73. +#ifndef weak_alias
  74. +#define __strverscmp strverscmp
  75. +#endif
  76. +
  77. int
  78. __strverscmp (const char *s1, const char *s2)
  79. {
  80. @@ -104,5 +109,7 @@ __strverscmp (const char *s1, const char *s2)
  81. return state;
  82. }
  83. }
  84. +#ifdef weak_alias
  85. libc_hidden_def (__strverscmp)
  86. weak_alias (__strverscmp, strverscmp)
  87. +#endif