[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] ENVZ option group



This looked quick, so I did it.  I should have a few more in a bit.

ChangeLog.eglibc:
2007-08-10  Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>

	Implement the OPTION_EGLIBC_ENVZ option group.

	* option-groups.def (OPTION_EGLIBC_ENVZ): New entry.
	* option-groups.defaults (OPTION_EGLIBC_ENVZ): Initialize
	* string/Makefile (routines, tests): Put the envz routines and the
	bug-envz1 test in the group.

Index: option-groups.def
===================================================================
--- option-groups.def	(revision 3009)
+++ option-groups.def	(working copy)
@@ -114,7 +114,22 @@
 
           WCHAR_T           - EGLIBC's internal form (target-endian,
                               32-bit ISO 10646)
-         
+
+config OPTION_EGLIBC_ENVZ
+   bool "Functions for handling envz-style environment vectors."
+   help
+       This option group contains functions for creating and operating
+       on envz vectors.  An "envz vector" is a vector of strings in a
+       contiguous block of memory, where each element is a name-value
+       pair, and elements are separated from their neighbors by null
+       characters.
+
+       This option group includes the following functions:
+
+        envz_add        envz_merge 
+        envz_entry      envz_remove
+        envz_get        envz_strip 
+
 config OPTION_EGLIBC_INET
    bool "Networking support"
    help
Index: string/Makefile
===================================================================
--- string/Makefile	(revision 3009)
+++ string/Makefile	(working copy)
@@ -40,10 +40,12 @@
 		   $(addprefix argz-,append count create ctsep next	\
 			             delete extract insert stringify	\
 				     addsep replace)			\
-		   envz basename					\
+		   basename						\
 		   strcoll_l strxfrm_l string-inlines memrchr		\
 		   xpg-strerror strerror_l
 
+routines-$(OPTION_EGLIBC_ENVZ) += envz 
+
 # Gcc internally generates calls to unbounded memcpy and memset
 # for -fbounded-pointer compiles.  Glibc uses memchr for explicit checks.
 o-objects.ob	:= memcpy.o memset.o memchr.o
@@ -56,7 +58,8 @@
 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
 		   tst-strtok tst-strfry	\
 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
-		   bug-envz1 tst-strxfrm2
+		   tst-strxfrm2
+tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1 
 tests-$(OPTION_EGLIBC_LOCALE_CODE) \
 		+= tst-strxfrm bug-strcoll1
 distribute	:= memcopy.h pagecopy.h tst-svc.expect test-string.h
Index: option-groups.defaults
===================================================================
--- option-groups.defaults	(revision 3009)
+++ option-groups.defaults	(working copy)
@@ -10,6 +10,7 @@
 # By default, all option groups are enabled.
 OPTION_EGLIBC_CATGETS = y
 OPTION_EGLIBC_CHARSETS = y
+OPTION_EGLIBC_ENVZ = y
 OPTION_EGLIBC_INET = y
 OPTION_EGLIBC_LIBM = y
 OPTION_EGLIBC_LOCALES = y