ci/eval: add rebuildsByPlatform to the comparison result (#363751)
[NixPkgs.git] / pkgs / by-name / mj / mjpegtools / c++-17-fixes.patch
blob018cc7e9beabd5a7d2a895640221d41b2d8fb7f1
1 diff -ur a/mplex/main.cpp b/mplex/main.cpp
2 --- a/mplex/main.cpp 2021-09-05 02:14:13.029372000 -0400
3 +++ b/mplex/main.cpp 2023-09-23 08:47:07.683450627 -0400
4 @@ -50,7 +50,7 @@
5 #include "multiplexor.hpp"
8 -using std::auto_ptr;
9 +using std::unique_ptr;
12 /*************************************************************************
13 @@ -138,7 +138,7 @@
14 void
15 FileOutputStream::NextSegment( )
17 - auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] );
18 + unique_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] );
19 char *prev_filename = prev_filename_buf.get();
20 fclose(strm);
21 ++segment_num;
22 diff -ur a/utils/fastintfns.h b/utils/fastintfns.h
23 --- a/utils/fastintfns.h 2021-09-05 02:14:13.033372000 -0400
24 +++ b/utils/fastintfns.h 2023-09-23 08:44:40.147112973 -0400
25 @@ -2,12 +2,17 @@
27 * WARNING: Assumes 2's complement arithmetic.
29 -static inline int intmax( register int x, register int y )
30 +#ifdef __cplusplus
31 +#define REGISTER
32 +#else
33 +#define REGISTER register
34 +#endif
35 +static inline int intmax( REGISTER int x, REGISTER int y )
37 return x < y ? y : x;
40 -static inline int intmin( register int x, register int y )
41 +static inline int intmin( REGISTER int x, REGISTER int y )
43 return x < y ? x : y;