summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-30 21:58:17 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-30 21:58:17 +0000
commite23b97f4e2c93d6258860c63a9feec54e43c4dc0 (patch)
treeede4e8638ea7462f8845bfb148b1fe791f66d932 /nuttx
parente503954f9899ad12f55646317e48fad4bf1cbfb2 (diff)
downloadpx4-nuttx-e23b97f4e2c93d6258860c63a9feec54e43c4dc0.tar.gz
px4-nuttx-e23b97f4e2c93d6258860c63a9feec54e43c4dc0.tar.bz2
px4-nuttx-e23b97f4e2c93d6258860c63a9feec54e43c4dc0.zip
Move more files into subdirectories under lib/
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3442 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/lib/Makefile28
-rw-r--r--nuttx/lib/lib_basename.c2
-rwxr-xr-xnuttx/lib/lib_crc32.c2
-rw-r--r--nuttx/lib/lib_dbg.c2
-rw-r--r--nuttx/lib/lib_dirname.c2
-rw-r--r--nuttx/lib/lib_dumpbuffer.c2
-rw-r--r--nuttx/lib/lib_filesem.c2
-rwxr-xr-xnuttx/lib/lib_libdtoa.c2
-rw-r--r--nuttx/lib/lib_sem.c2
-rw-r--r--nuttx/lib/lib_streamsem.c2
-rw-r--r--nuttx/lib/math/Make.defs37
-rw-r--r--nuttx/lib/math/lib_b16cos.c (renamed from nuttx/lib/lib_b16cos.c)4
-rw-r--r--nuttx/lib/math/lib_b16sin.c (renamed from nuttx/lib/lib_b16sin.c)4
-rw-r--r--nuttx/lib/math/lib_fixedmath.c (renamed from nuttx/lib/lib_fixedmath.c)4
-rw-r--r--nuttx/lib/math/lib_rint.c (renamed from nuttx/lib/lib_rint.c)4
-rw-r--r--nuttx/lib/net/Make.defs36
-rw-r--r--nuttx/lib/net/lib_etherntoa.c (renamed from nuttx/lib/lib_etherntoa.c)4
-rw-r--r--nuttx/lib/net/lib_htonl.c (renamed from nuttx/lib/lib_htonl.c)4
-rw-r--r--nuttx/lib/net/lib_htons.c (renamed from nuttx/lib/lib_htons.c)4
-rw-r--r--nuttx/lib/net/lib_inetntoa.c (renamed from nuttx/lib/lib_inetntoa.c)4
-rw-r--r--nuttx/lib/unistd/Make.defs42
-rw-r--r--nuttx/lib/unistd/lib_chdir.c (renamed from nuttx/lib/lib_chdir.c)4
-rw-r--r--nuttx/lib/unistd/lib_getcwd.c (renamed from nuttx/lib/lib_getcwd.c)4
-rw-r--r--nuttx/lib/unistd/lib_getopt.c (renamed from nuttx/lib/lib_getopt.c)2
-rw-r--r--nuttx/lib/unistd/lib_getoptargp.c (renamed from nuttx/lib/lib_getoptargp.c)4
-rw-r--r--nuttx/lib/unistd/lib_getoptindp.c (renamed from nuttx/lib/lib_getoptindp.c)4
-rw-r--r--nuttx/lib/unistd/lib_getoptoptp.c (renamed from nuttx/lib/lib_getoptoptp.c)4
27 files changed, 162 insertions, 53 deletions
diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile
index 94dfe888c..e33e9ddde 100644
--- a/nuttx/lib/Makefile
+++ b/nuttx/lib/Makefile
@@ -36,7 +36,10 @@
-include $(TOPDIR)/Make.defs
include stdio/Make.defs
include stdlib/Make.defs
+include unistd/Make.defs
include string/Make.defs
+include math/Make.defs
+include net/Make.defs
include time/Make.defs
include queue/Make.defs
@@ -48,19 +51,6 @@ ifneq ($(CONFIG_NFILE_STREAMS),0)
MISC_SRCS += lib_streamsem.c
endif
-CTYPE_SRCS =
-
-MATH_SRCS = lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c
-
-UNISTD_SRCS = lib_getopt.c lib_getoptargp.c lib_getoptindp.c lib_getoptoptp.c
-ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
-ifneq ($(CONFIG_DISABLE_ENVIRON),y)
-UNISTD_SRCS += lib_chdir.c lib_getcwd.c
-endif
-endif
-
-NET_SRCS = lib_htons.c lib_htonl.c lib_inetntoa.c lib_etherntoa.c
-
LIBGEN_SRCS = lib_basename.c lib_dirname.c
REGEX_SRCS = lib_match.c
@@ -69,8 +59,8 @@ CRC_SRCS = lib_crc32.c
DBG_SRCS = lib_dbg.c lib_dumpbuffer.c
-CSRCS = $(MISC_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) $(STRING_SRCS) \
- $(TIME_SRCS) $(MATH_SRCS) $(UNISTD_SRCS) $(NET_SRCS) $(LIBGEN_SRCS) \
+CSRCS = $(MISC_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) $(UNISTD_SRCS) \
+ $(STRING_SRCS) $(MATH_SRCS) $(NET_SRCS) $(TIME_SRCS) $(LIBGEN_SRCS) \
$(REGEX_SRCS) $(CRC_SRCS) $(QUEUE_SRCS) $(DBG_SRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
@@ -80,10 +70,13 @@ OBJS = $(AOBJS) $(COBJS)
ROOTDEPPATH = --dep-path .
STDIODEPPATH = --dep-path stdio
STDLIBDEPPATH = --dep-path stdlib
+UNISTDDEPPATH = --dep-path unistd
STRINGDEPPATH = --dep-path string
+MATHDEPPATH = --dep-path math
+NETDEPPATH = --dep-path net
TIMEDEPPATH = --dep-path time
QUEUEDEPPATH = --dep-path queue
-VPATH = stdio:stdlib:string:time:queue
+VPATH = stdio:stdlib:unistd:string:math:net:time:queue
BIN = liblib$(LIBEXT)
@@ -102,7 +95,8 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(STDIODEPPATH) $(STDLIBDEPPATH) \
- $(STRINGDEPPATH) $(TIMEDEPPATH) $(QUEUEDEPPATH) \
+ $(UNISTDDEPPATH) $(STRINGDEPPATH) $(MATHDEPPATH) $(NETDEPPATH) \
+ $(TIMEDEPPATH) $(QUEUEDEPPATH) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
diff --git a/nuttx/lib/lib_basename.c b/nuttx/lib/lib_basename.c
index 6464b1770..5bb711829 100644
--- a/nuttx/lib/lib_basename.c
+++ b/nuttx/lib/lib_basename.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_basename.c
+ * lib/unistd/lib_basename.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_crc32.c b/nuttx/lib/lib_crc32.c
index e819145d5..77c34558d 100755
--- a/nuttx/lib/lib_crc32.c
+++ b/nuttx/lib/lib_crc32.c
@@ -1,5 +1,5 @@
/************************************************************************************************
- * lib/lib_crc32.c
+ * lib/unistd/lib_crc32.c
*
* This file is a part of NuttX:
*
diff --git a/nuttx/lib/lib_dbg.c b/nuttx/lib/lib_dbg.c
index 890928cc2..43feea8b1 100644
--- a/nuttx/lib/lib_dbg.c
+++ b/nuttx/lib/lib_dbg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_dbg.c
+ * lib/unistd/lib_dbg.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_dirname.c b/nuttx/lib/lib_dirname.c
index c80bc80a3..7ed6c04c6 100644
--- a/nuttx/lib/lib_dirname.c
+++ b/nuttx/lib/lib_dirname.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_dirname.c
+ * lib/unistd/lib_dirname.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_dumpbuffer.c b/nuttx/lib/lib_dumpbuffer.c
index 7444a5ced..f3e1b5b2b 100644
--- a/nuttx/lib/lib_dumpbuffer.c
+++ b/nuttx/lib/lib_dumpbuffer.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_dumpbuffer.c
+ * lib/unistd/lib_dumpbuffer.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_filesem.c b/nuttx/lib/lib_filesem.c
index cea6092dc..6d06b613c 100644
--- a/nuttx/lib/lib_filesem.c
+++ b/nuttx/lib/lib_filesem.c
@@ -1,5 +1,5 @@
/************************************************************************
- * lib/lib_filesem.c
+ * lib/unistd/lib_filesem.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_libdtoa.c b/nuttx/lib/lib_libdtoa.c
index 1f74247c2..3bfe70aea 100755
--- a/nuttx/lib/lib_libdtoa.c
+++ b/nuttx/lib/lib_libdtoa.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_libdtoa.c
+ * lib/unistd/lib_libdtoa.c
*
* This file was ported to NuttX by Yolande Cates.
*
diff --git a/nuttx/lib/lib_sem.c b/nuttx/lib/lib_sem.c
index af38f3293..4884950e9 100644
--- a/nuttx/lib/lib_sem.c
+++ b/nuttx/lib/lib_sem.c
@@ -1,5 +1,5 @@
/************************************************************
- * lib/lib_sem.c
+ * lib/unistd/lib_sem.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_streamsem.c b/nuttx/lib/lib_streamsem.c
index 5560778cf..81da6dcc8 100644
--- a/nuttx/lib/lib_streamsem.c
+++ b/nuttx/lib/lib_streamsem.c
@@ -1,5 +1,5 @@
/************************************************************************
- * lib/ib_streamsem.c
+ * lib/unistd/lib_streamsem.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/math/Make.defs b/nuttx/lib/math/Make.defs
new file mode 100644
index 000000000..0c3414b98
--- /dev/null
+++ b/nuttx/lib/math/Make.defs
@@ -0,0 +1,37 @@
+############################################################################
+# lib/math/Make.defs
+#
+# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# 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.
+#
+############################################################################
+
+MATH_SRCS = lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c
+
diff --git a/nuttx/lib/lib_b16cos.c b/nuttx/lib/math/lib_b16cos.c
index 93f5ee2f6..69cc61042 100644
--- a/nuttx/lib/lib_b16cos.c
+++ b/nuttx/lib/math/lib_b16cos.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_b16cos.c
+ * lib/math/lib_b16cos.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_b16sin.c b/nuttx/lib/math/lib_b16sin.c
index 7e2bcac56..fc4b5e566 100644
--- a/nuttx/lib/lib_b16sin.c
+++ b/nuttx/lib/math/lib_b16sin.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_b16sin.c
+ * lib/math/lib_b16sin.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_fixedmath.c b/nuttx/lib/math/lib_fixedmath.c
index d1717d945..b20158dc8 100644
--- a/nuttx/lib/lib_fixedmath.c
+++ b/nuttx/lib/math/lib_fixedmath.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_fixedmath.c
+ * lib/math/lib_fixedmath.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_rint.c b/nuttx/lib/math/lib_rint.c
index 28eb7fc44..b122870b8 100644
--- a/nuttx/lib/lib_rint.c
+++ b/nuttx/lib/math/lib_rint.c
@@ -1,7 +1,7 @@
/************************************************************
- * lib_rint.c
+ * lib/math/lib_rint.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/net/Make.defs b/nuttx/lib/net/Make.defs
new file mode 100644
index 000000000..5cacb1079
--- /dev/null
+++ b/nuttx/lib/net/Make.defs
@@ -0,0 +1,36 @@
+############################################################################
+# lib/net/Make.defs
+#
+# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# 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.
+#
+############################################################################
+
+NET_SRCS = lib_htons.c lib_htonl.c lib_inetntoa.c lib_etherntoa.c
diff --git a/nuttx/lib/lib_etherntoa.c b/nuttx/lib/net/lib_etherntoa.c
index eed9cb544..253549183 100644
--- a/nuttx/lib/lib_etherntoa.c
+++ b/nuttx/lib/net/lib_etherntoa.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_etherntoa.c
+ * lib/net/lib_etherntoa.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_htonl.c b/nuttx/lib/net/lib_htonl.c
index 94af90f0f..f43b52505 100644
--- a/nuttx/lib/lib_htonl.c
+++ b/nuttx/lib/net/lib_htonl.c
@@ -1,7 +1,7 @@
/************************************************************
- * lib/lib_ntohl.c
+ * lib/net/lib_ntohl.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_htons.c b/nuttx/lib/net/lib_htons.c
index cea07b871..66d736a33 100644
--- a/nuttx/lib/lib_htons.c
+++ b/nuttx/lib/net/lib_htons.c
@@ -1,7 +1,7 @@
/***************************************************************************
- * lib/lib_htons.c
+ * lib/net/lib_htons.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_inetntoa.c b/nuttx/lib/net/lib_inetntoa.c
index c19670aff..38414dde8 100644
--- a/nuttx/lib/lib_inetntoa.c
+++ b/nuttx/lib/net/lib_inetntoa.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_inetntoa.c
+ * lib/net/lib_inetntoa.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/unistd/Make.defs b/nuttx/lib/unistd/Make.defs
new file mode 100644
index 000000000..90f172406
--- /dev/null
+++ b/nuttx/lib/unistd/Make.defs
@@ -0,0 +1,42 @@
+############################################################################
+# lib/unistd/Make.defs
+#
+# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# 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.
+#
+############################################################################
+
+UNISTD_SRCS = lib_getopt.c lib_getoptargp.c lib_getoptindp.c lib_getoptoptp.c
+ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
+ifneq ($(CONFIG_DISABLE_ENVIRON),y)
+UNISTD_SRCS += lib_chdir.c lib_getcwd.c
+endif
+endif
+
diff --git a/nuttx/lib/lib_chdir.c b/nuttx/lib/unistd/lib_chdir.c
index 942ced697..15dc64383 100644
--- a/nuttx/lib/lib_chdir.c
+++ b/nuttx/lib/unistd/lib_chdir.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_chdir.c
+ * lib/unistd/lib_chdir.c
*
- * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_getcwd.c b/nuttx/lib/unistd/lib_getcwd.c
index 20f7cef48..6888470ac 100644
--- a/nuttx/lib/lib_getcwd.c
+++ b/nuttx/lib/unistd/lib_getcwd.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_getcwd.c
+ * lib/unistd/lib_getcwd.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_getopt.c b/nuttx/lib/unistd/lib_getopt.c
index f50c6ef1d..26a2c7fae 100644
--- a/nuttx/lib/lib_getopt.c
+++ b/nuttx/lib/unistd/lib_getopt.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lib/lib_getopt.c
+ * lib/unistd/lib_getopt.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/nuttx/lib/lib_getoptargp.c b/nuttx/lib/unistd/lib_getoptargp.c
index 75a1434a1..4a483c051 100644
--- a/nuttx/lib/lib_getoptargp.c
+++ b/nuttx/lib/unistd/lib_getoptargp.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_getoptargp.c
+ * lib/unistd/lib_getoptargp.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_getoptindp.c b/nuttx/lib/unistd/lib_getoptindp.c
index 87ddbca41..002201aa9 100644
--- a/nuttx/lib/lib_getoptindp.c
+++ b/nuttx/lib/unistd/lib_getoptindp.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_getoptindp.c
+ * lib/unistd/lib_getoptindp.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_getoptoptp.c b/nuttx/lib/unistd/lib_getoptoptp.c
index 4a0452f65..2214f2d14 100644
--- a/nuttx/lib/lib_getoptoptp.c
+++ b/nuttx/lib/unistd/lib_getoptoptp.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/lib_getoptoptp.c
+ * lib/unistd/lib_getoptoptp.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without