diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-11 12:10:07 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-11 12:27:47 +0100 |
commit | 7852af7c93140a5d78cf35414d4ae5b42bca187a (patch) | |
tree | 48e6413cb5f83fca6618bd51c4499bd41cb552a0 /src/common.h | |
parent | whitespace (diff) | |
download | scrotty-7852af7c93140a5d78cf35414d4ae5b42bca187a.tar.gz scrotty-7852af7c93140a5d78cf35414d4ae5b42bca187a.tar.bz2 scrotty-7852af7c93140a5d78cf35414d4ae5b42bca187a.tar.xz |
m + split out save_fbs to main + do not use PATH_MAX + do not use alloca
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common.h b/src/common.h index 93753b6..573a257 100644 --- a/src/common.h +++ b/src/common.h @@ -16,7 +16,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _POSIX_SOURCE +#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE < 200809L) +# if defined(_POSIX_C_SOURCE) +# undef _POSIX_C_SOURCE +# endif +# define _POSIX_C_SOURCE 200809L +#endif #include <stdio.h> #include <fcntl.h> #include <unistd.h> @@ -24,7 +29,6 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> -#include <alloca.h> #include <time.h> @@ -42,9 +46,6 @@ #ifndef SYSDIR # define SYSDIR "/sys" #endif -#ifndef PATH_MAX /* TODO can we avoid this and still have clean code */ -# define PATH_MAX 4096 -#endif /** |