summaryrefslogtreecommitdiff
path: root/sys-fs/autorun/files/autorun-3.17-headers.patch
blob: 113367305af06cc152222c43e65ee99bf289887d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
https://bugs.gentoo.org/251684
https://bugs.gentoo.org/875851
https://bugs.gentoo.org/877125
--- a/autorun.cc
+++ b/autorun.cc
@@ -90,6 +90,8 @@ char *strchr (), *strrchr ();
 
 #include <errno.h>
 
+#include <stdlib.h>
+
 #ifndef MNTTYPE_ISO9660
 #define MNTTYPE_ISO9660 "iso9660"
 #endif
--- a/autorun.cc
+++ b/autorun.cc
@@ -26,20 +26,6 @@
 #define HAVE_ARGP
 #endif
 
-#if STDC_HEADERS
-# include <string.h>
-#else
-# if !HAVE_STRCHR
-#  define strchr index
-#  define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# if !HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy ((s), (d), (n))
-#  define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
 #include <sys/types.h>
 #if HAVE_SYS_WAIT_H
 # include <sys/wait.h>
@@ -78,6 +64,8 @@ char *strchr (), *strrchr ();
 #include <stdarg.h>
 #include <mntent.h>
 #include "cdrom.h"
+#include <cstring>
+#include <climits>
 #include <list>
 #include <iostream>
 #include <libintl.h>
@@ -88,7 +76,7 @@ char *strchr (), *strrchr ();
 #include <getopt.h>
 #endif
 
-#include <errno.h>
+#include <cerrno>
 
 #include <stdlib.h>