missing: move definition of secure_getenv() to missing_stdlib.h

This commit is contained in:
Yu Watanabe 2018-12-06 06:49:18 +01:00
parent b19bb11142
commit 470f348b97
3 changed files with 15 additions and 9 deletions

View File

@ -113,6 +113,7 @@ basic_sources = files('''
missing_securebits.h
missing_socket.h
missing_stat.h
missing_stdlib.h
missing_syscall.h
missing_timerfd.h
missing_type.h

View File

@ -6,7 +6,6 @@
#include <errno.h>
#include <inttypes.h>
#include <linux/falloc.h>
#include <stdlib.h>
#include <sys/syscall.h>
#ifndef FS_NOCOW_FL
@ -61,14 +60,6 @@
#define DM_DEFERRED_REMOVE (1 << 17)
#endif
#if ! HAVE_SECURE_GETENV
# if HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
# error "neither secure_getenv nor __secure_getenv are available"
# endif
#endif
#ifndef CIFS_MAGIC_NUMBER
# define CIFS_MAGIC_NUMBER 0xFF534D42
#endif
@ -128,6 +119,7 @@
#include "missing_random.h"
#include "missing_resource.h"
#include "missing_socket.h"
#include "missing_stdlib.h"
#include "missing_timerfd.h"
#include "missing_type.h"

View File

@ -0,0 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include <stdlib.h>
/* stdlib.h */
#if !HAVE_SECURE_GETENV
# if HAVE___SECURE_GETENV
# define secure_getenv __secure_getenv
# else
# error "neither secure_getenv nor __secure_getenv are available"
# endif
#endif