comparison src/sysdep.c @ 51552:d84e9160d869

Remove redundant include of unistd.h, stdlib.h. Use HAVE_DECL_SYS_SIGLIST, not SYS_SIGLIST_DECLARED.
author Dave Love <fx@gnu.org>
date Thu, 12 Jun 2003 22:13:18 +0000
parents 22a5614b558f
children 1ef0c7b51ff9
comparison
equal deleted inserted replaced
51551:34f0347e6e45 51552:d84e9160d869
82 82
83 #include <stdio.h> 83 #include <stdio.h>
84 #include <sys/types.h> 84 #include <sys/types.h>
85 #include <sys/stat.h> 85 #include <sys/stat.h>
86 #include <errno.h> 86 #include <errno.h>
87
88 /* Get _POSIX_VDISABLE, if it is available. */
89 #ifdef HAVE_UNISTD_H
90 #include <unistd.h>
91 #endif
92
93 #ifdef HAVE_STDLIB_H
94 #include <stdlib.h>
95 #endif
96 87
97 #ifdef HAVE_SETPGID 88 #ifdef HAVE_SETPGID
98 #if !defined (USG) || defined (BSD_PGRPS) 89 #if !defined (USG) || defined (BSD_PGRPS)
99 #undef setpgrp 90 #undef setpgrp
100 #define setpgrp setpgid 91 #define setpgrp setpgid
2843 return (old_mask); 2834 return (old_mask);
2844 } 2835 }
2845 2836
2846 #endif /* POSIX_SIGNALS */ 2837 #endif /* POSIX_SIGNALS */
2847 2838
2848 #if !defined HAVE_STRSIGNAL && !defined SYS_SIGLIST_DECLARED 2839 #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
2849 static char *my_sys_siglist[NSIG]; 2840 static char *my_sys_siglist[NSIG];
2850 # ifdef sys_siglist 2841 # ifdef sys_siglist
2851 # undef sys_siglist 2842 # undef sys_siglist
2852 # endif 2843 # endif
2853 # define sys_siglist my_sys_siglist 2844 # define sys_siglist my_sys_siglist
2859 #ifdef POSIX_SIGNALS 2850 #ifdef POSIX_SIGNALS
2860 sigemptyset (&empty_mask); 2851 sigemptyset (&empty_mask);
2861 sigfillset (&full_mask); 2852 sigfillset (&full_mask);
2862 #endif 2853 #endif
2863 2854
2864 #if !defined HAVE_STRSIGNAL && !defined SYS_SIGLIST_DECLARED 2855 #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
2865 if (! initialized) 2856 if (! initialized)
2866 { 2857 {
2867 # ifdef SIGABRT 2858 # ifdef SIGABRT
2868 sys_siglist[SIGABRT] = "Aborted"; 2859 sys_siglist[SIGABRT] = "Aborted";
2869 # endif 2860 # endif
3019 # endif 3010 # endif
3020 # ifdef SIGXFSZ 3011 # ifdef SIGXFSZ
3021 sys_siglist[SIGXFSZ] = "File size limit exceeded"; 3012 sys_siglist[SIGXFSZ] = "File size limit exceeded";
3022 # endif 3013 # endif
3023 } 3014 }
3024 #endif /* !defined HAVE_STRSIGNAL && !defined SYS_SIGLIST_DECLARED */ 3015 #endif /* !defined HAVE_STRSIGNAL && !defined HAVE_DECL_SYS_SIGLIST */
3025 } 3016 }
3026 3017
3027 #ifndef HAVE_RANDOM 3018 #ifndef HAVE_RANDOM
3028 #ifdef random 3019 #ifdef random
3029 #define HAVE_RANDOM 3020 #define HAVE_RANDOM