1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 * 3 * Permission to use, copy, modify, and distribute this software 4 * is freely granted, provided that this notice is preserved. 5 */ 6 7 #ifndef _ENVZ_H_ 8 #define _ENVZ_H_ 9 10 #include <sys/cdefs.h> 11 #define __need_size_t 12 #include <stddef.h> 13 14 _BEGIN_STD_C 15 16 #ifndef _ERROR_T_DECLARED 17 typedef int error_t; 18 #define _ERROR_T_DECLARED 19 #endif 20 21 /* The newlib implementation of these functions assumes that sizeof(char) == 1. */ 22 char * envz_entry (const char *envz, size_t envz_len, const char *name); 23 char * envz_get (const char *envz, size_t envz_len, const char *name); 24 error_t envz_add (char **envz, size_t *envz_len, const char *name, const char *value); 25 error_t envz_merge (char **envz, size_t *envz_len, const char *envz2, size_t envz2_len, int override); 26 void envz_remove(char **envz, size_t *envz_len, const char *name); 27 void envz_strip (char **envz, size_t *envz_len); 28 29 _END_STD_C 30 31 #endif /* _ENVZ_H_ */ 32