libs/libc: Remove support for CONFIG_FS_WRITABLE
The mktemp family of functions are built unconditionally now (but not necessarily included in any build).
This commit is contained in:
parent
74ce4ab0ee
commit
382513e997
@ -1,35 +1,20 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# libs/libc/stdio/Make.defs
|
# libs/libc/stdio/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-2014, 2019 Gregory Nutt. All rights reserved.
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership. The
|
||||||
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance with the
|
||||||
|
# License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
#
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# notice, this list of conditions and the following disclaimer.
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# notice, this list of conditions and the following disclaimer in
|
# License for the specific language governing permissions and limitations
|
||||||
# the documentation and/or other materials provided with the
|
# under the License.
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
@ -79,9 +64,7 @@ CSRCS += lib_fscanf.c lib_vfscanf.c
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_FS_WRITABLE),y)
|
|
||||||
CSRCS += lib_tempnam.c lib_tmpnam.c
|
CSRCS += lib_tempnam.c lib_tmpnam.c
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(CONFIG_STDIO_DISABLE_BUFFERING),y)
|
ifneq ($(CONFIG_STDIO_DISABLE_BUFFERING),y)
|
||||||
CSRCS += lib_setbuf.c lib_setvbuf.c
|
CSRCS += lib_setbuf.c lib_setvbuf.c
|
||||||
|
@ -23,7 +23,6 @@ config LIB_HOMEDIR
|
|||||||
config LIBC_TMPDIR
|
config LIBC_TMPDIR
|
||||||
string "Temporary file directory"
|
string "Temporary file directory"
|
||||||
default "/tmp"
|
default "/tmp"
|
||||||
depends on FS_WRITABLE
|
|
||||||
---help---
|
---help---
|
||||||
If a write-able file system is selected, this string will be
|
If a write-able file system is selected, this string will be
|
||||||
provided to specify the full path to a directory where temporary
|
provided to specify the full path to a directory where temporary
|
||||||
@ -33,7 +32,6 @@ config LIBC_TMPDIR
|
|||||||
config LIBC_MAX_TMPFILE
|
config LIBC_MAX_TMPFILE
|
||||||
int "Maximum size of a temporary file path"
|
int "Maximum size of a temporary file path"
|
||||||
default 32
|
default 32
|
||||||
depends on FS_WRITABLE
|
|
||||||
---help---
|
---help---
|
||||||
If a write-able file system is selected, then temporary file may be
|
If a write-able file system is selected, then temporary file may be
|
||||||
supported at the path provided by LIBC_TMPDIR. The tmpnam() interface
|
supported at the path provided by LIBC_TMPDIR. The tmpnam() interface
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# libs/libc/stdlib/Make.defs
|
# libs/libc/stdlib/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved.
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# this work for additional information regarding copyright ownership. The
|
||||||
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance with the
|
||||||
|
# License. You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
# modification, are permitted provided that the following conditions
|
|
||||||
# are met:
|
|
||||||
#
|
#
|
||||||
# 1. Redistributions of source code must retain the above copyright
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# notice, this list of conditions and the following disclaimer.
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# notice, this list of conditions and the following disclaimer in
|
# License for the specific language governing permissions and limitations
|
||||||
# the documentation and/or other materials provided with the
|
# under the License.
|
||||||
# distribution.
|
|
||||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
@ -40,10 +25,7 @@ CSRCS += lib_itoa.c lib_labs.c lib_llabs.c
|
|||||||
CSRCS += lib_bsearch.c lib_rand.c lib_qsort.c lib_srand.c
|
CSRCS += lib_bsearch.c lib_rand.c lib_qsort.c lib_srand.c
|
||||||
CSRCS += lib_strtol.c lib_strtoll.c lib_strtoul.c lib_strtoull.c
|
CSRCS += lib_strtol.c lib_strtoll.c lib_strtoul.c lib_strtoull.c
|
||||||
CSRCS += lib_strtod.c lib_strtof.c lib_strtold.c lib_checkbase.c
|
CSRCS += lib_strtod.c lib_strtof.c lib_strtold.c lib_checkbase.c
|
||||||
|
|
||||||
ifeq ($(CONFIG_FS_WRITABLE),y)
|
|
||||||
CSRCS += lib_mktemp.c lib_mkstemp.c
|
CSRCS += lib_mktemp.c lib_mkstemp.c
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_LIBC_WCHAR),y)
|
ifeq ($(CONFIG_LIBC_WCHAR),y)
|
||||||
CSRCS += lib_mbtowc.c lib_wctomb.c
|
CSRCS += lib_mbtowc.c lib_wctomb.c
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* libs/libc/stdlib/lib_mkstemp.c
|
* libs/libc/stdlib/lib_mkstemp.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014, 2017 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -49,8 +34,6 @@
|
|||||||
|
|
||||||
#include <nuttx/semaphore.h>
|
#include <nuttx/semaphore.h>
|
||||||
|
|
||||||
#ifdef CONFIG_FS_WRITABLE
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor definitions
|
* Pre-processor definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -292,4 +275,3 @@ int mkstemp(FAR char *path_template)
|
|||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_FS_WRITABLE */
|
|
||||||
|
@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* libs/libc/stdlib/lib_mktemp.c
|
* libs/libc/stdlib/lib_mktemp.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* distribution.
|
|
||||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
* used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
||||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
||||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -43,8 +28,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef CONFIG_FS_WRITABLE
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor definitions
|
* Pre-processor definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -77,4 +60,3 @@ int mktemp(FAR char *path_template)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_FS_WRITABLE */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user