003 File Manager
Current Path:
/usr/src/contrib/sendmail/libsm
usr
/
src
/
contrib
/
sendmail
/
libsm
/
📁
..
📄
Makefile
(346 B)
📄
Makefile.m4
(1.92 KB)
📄
README
(4.42 KB)
📄
assert.c
(4.13 KB)
📄
assert.html
(13.86 KB)
📄
b-strcmp.c
(3.4 KB)
📄
b-strl.c
(5 KB)
📄
cdefs.html
(2.39 KB)
📄
cf.c
(1.97 KB)
📄
clock.c
(13.89 KB)
📄
clrerr.c
(872 B)
📄
config.c
(4.47 KB)
📄
debug.c
(8.91 KB)
📄
debug.html
(7.68 KB)
📄
errstring.c
(6.03 KB)
📄
exc.c
(13.05 KB)
📄
exc.html
(23.27 KB)
📄
fclose.c
(3.13 KB)
📄
feof.c
(961 B)
📄
ferror.c
(932 B)
📄
fflush.c
(3.1 KB)
📄
fget.c
(2.37 KB)
📄
findfp.c
(10.65 KB)
📄
flags.c
(1.27 KB)
📄
fopen.c
(8.3 KB)
📄
fpos.c
(3.12 KB)
📄
fprintf.c
(1.35 KB)
📄
fpurge.c
(1.15 KB)
📄
fput.c
(1.25 KB)
📄
fread.c
(2.28 KB)
📄
fscanf.c
(1.34 KB)
📄
fseek.c
(7.25 KB)
📄
fvwrite.c
(6.24 KB)
📄
fvwrite.h
(740 B)
📄
fwalk.c
(1.41 KB)
📄
fwrite.c
(1.54 KB)
📄
gen.html
(910 B)
📄
get.c
(1.12 KB)
📄
glue.h
(731 B)
📄
heap.c
(17.29 KB)
📄
heap.html
(13.07 KB)
📄
index.html
(5.95 KB)
📄
inet6_ntop.c
(1.1 KB)
📄
io.html
(26.6 KB)
📄
ldap.c
(35.72 KB)
📄
local.h
(9.42 KB)
📄
makebuf.c
(3.36 KB)
📄
match.c
(2.77 KB)
📄
mbdb.c
(16.61 KB)
📄
memstat.c
(5.13 KB)
📄
mpeix.c
(13.84 KB)
📄
niprop.c
(4.64 KB)
📄
notify.c
(3.32 KB)
📄
put.c
(1.61 KB)
📄
refill.c
(7.09 KB)
📄
rewind.c
(1.08 KB)
📄
rpool.c
(11.54 KB)
📄
rpool.html
(6.08 KB)
📄
sem.c
(4.41 KB)
📄
setvbuf.c
(4.2 KB)
📄
shm.c
(2.62 KB)
📄
signal.c
(6.75 KB)
📄
smstdio.c
(6.14 KB)
📄
snprintf.c
(2.29 KB)
📄
sscanf.c
(2.26 KB)
📄
stdio.c
(9.7 KB)
📄
strcasecmp.c
(3.14 KB)
📄
strdup.c
(2.79 KB)
📄
strerror.c
(1.27 KB)
📄
strexit.c
(2.76 KB)
📄
string.c
(1.29 KB)
📄
stringf.c
(1.77 KB)
📄
strio.c
(9.18 KB)
📄
strl.c
(7.52 KB)
📄
strrevcmp.c
(1.61 KB)
📄
strto.c
(5.45 KB)
📄
syslogio.c
(4.11 KB)
📄
t-cf.c
(934 B)
📄
t-event.c
(1.79 KB)
📄
t-exc.c
(2.75 KB)
📄
t-fget.c
(1.71 KB)
📄
t-float.c
(1.78 KB)
📄
t-fopen.c
(875 B)
📄
t-heap.c
(1.3 KB)
📄
t-inet6_ntop.c
(1.4 KB)
📄
t-match.c
(1.1 KB)
📄
t-memstat.c
(2.17 KB)
📄
t-notify.c
(1.81 KB)
📄
t-path.c
(742 B)
📄
t-qic.c
(5.43 KB)
📄
t-rpool.c
(1.5 KB)
📄
t-scanf.c
(1.38 KB)
📄
t-sem.c
(5.85 KB)
📄
t-shm.c
(4.42 KB)
📄
t-smstdio.c
(1.55 KB)
📄
t-string.c
(968 B)
📄
t-strio.c
(775 B)
📄
t-strl.c
(3.53 KB)
📄
t-strrevcmp.c
(994 B)
📄
t-types.c
(2.7 KB)
📄
test.c
(2.73 KB)
📄
ungetc.c
(3.93 KB)
📄
util.c
(4.46 KB)
📄
vasprintf.c
(2.91 KB)
📄
vfprintf.c
(24.09 KB)
📄
vfscanf.c
(18.76 KB)
📄
vprintf.c
(999 B)
📄
vsnprintf.c
(1.87 KB)
📄
wbuf.c
(2.51 KB)
📄
wsetup.c
(1.88 KB)
📄
xtrap.c
(653 B)
Editing: config.c
/* * Copyright (c) 2000-2003, 2007 Proofpoint, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the sendmail distribution. * */ #include <sm/gen.h> SM_RCSID("@(#)$Id: config.c,v 1.32 2013-11-22 20:51:42 ca Exp $") #include <stdlib.h> #include <sm/heap.h> #include <sm/string.h> #include <sm/conf.h> /* ** PUTENV -- emulation of putenv() in terms of setenv() ** ** Not needed on Posix-compliant systems. ** This doesn't have full Posix semantics, but it's good enough ** for sendmail. ** ** Parameter: ** env -- the environment to put. ** ** Returns: ** 0 on success, < 0 on failure. */ #if NEEDPUTENV # if NEEDPUTENV == 2 /* no setenv(3) call available */ int putenv(str) char *str; { char **current; int matchlen, envlen = 0; char *tmp; char **newenv; static bool first = true; extern char **environ; /* ** find out how much of str to match when searching ** for a string to replace. */ if ((tmp = strchr(str, '=')) == NULL || tmp == str) matchlen = strlen(str); else matchlen = (int) (tmp - str); ++matchlen; /* ** Search for an existing string in the environment and find the ** length of environ. If found, replace and exit. */ for (current = environ; *current != NULL; current++) { ++envlen; if (strncmp(str, *current, matchlen) == 0) { /* found it, now insert the new version */ *current = (char *) str; return 0; } } /* ** There wasn't already a slot so add space for a new slot. ** If this is our first time through, use malloc(), else realloc(). */ if (first) { newenv = (char **) sm_malloc(sizeof(char *) * (envlen + 2)); if (newenv == NULL) return -1; first = false; (void) memcpy(newenv, environ, sizeof(char *) * envlen); } else { newenv = (char **) sm_realloc((char *) environ, sizeof(char *) * (envlen + 2)); if (newenv == NULL) return -1; } /* actually add in the new entry */ environ = newenv; environ[envlen] = (char *) str; environ[envlen + 1] = NULL; return 0; } # else /* NEEDPUTENV == 2 */ int putenv(env) char *env; { char *p; int l; char nbuf[100]; p = strchr(env, '='); if (p == NULL) return 0; l = p - env; if (l > sizeof nbuf - 1) l = sizeof nbuf - 1; memmove(nbuf, env, l); nbuf[l] = '\0'; return setenv(nbuf, ++p, 1); } # endif /* NEEDPUTENV == 2 */ #endif /* NEEDPUTENV */ /* ** UNSETENV -- remove a variable from the environment ** ** Not needed on newer systems. ** ** Parameters: ** name -- the string name of the environment variable to be ** deleted from the current environment. ** ** Returns: ** none. ** ** Globals: ** environ -- a pointer to the current environment. ** ** Side Effects: ** Modifies environ. */ #if !HASUNSETENV void unsetenv(name) char *name; { extern char **environ; register char **pp; int len = strlen(name); for (pp = environ; *pp != NULL; pp++) { if (strncmp(name, *pp, len) == 0 && ((*pp)[len] == '=' || (*pp)[len] == '\0')) break; } for (; *pp != NULL; pp++) *pp = pp[1]; } #endif /* !HASUNSETENV */ char *SmCompileOptions[] = { #if SM_CONF_BROKEN_STRTOD "SM_CONF_BROKEN_STRTOD", #endif #if SM_CONF_GETOPT "SM_CONF_GETOPT", #endif #if SM_CONF_LDAP_INITIALIZE "SM_CONF_LDAP_INITIALIZE", #endif #if SM_CONF_LDAP_MEMFREE "SM_CONF_LDAP_MEMFREE", #endif #if SM_CONF_LONGLONG "SM_CONF_LONGLONG", #endif #if SM_CONF_MEMCHR "SM_CONF_MEMCHR", #endif #if SM_CONF_MSG "SM_CONF_MSG", #endif #if SM_CONF_QUAD_T "SM_CONF_QUAD_T", #endif #if SM_CONF_SEM "SM_CONF_SEM", #endif #if SM_CONF_SETITIMER "SM_CONF_SETITIMER", #endif #if SM_CONF_SIGSETJMP "SM_CONF_SIGSETJMP", #endif #if SM_CONF_SHM "SM_CONF_SHM", #endif #if SM_CONF_SHM_DELAY "SM_CONF_SHM_DELAY", #endif #if SM_CONF_SSIZE_T "SM_CONF_SSIZE_T", #endif #if SM_CONF_STDBOOL_H "SM_CONF_STDBOOL_H", #endif #if SM_CONF_STDDEF_H "SM_CONF_STDDEF_H", #endif #if 0 /* XXX this is always enabled (for now) */ #if SM_CONF_STRL "SM_CONF_STRL", #endif #endif /* 0 */ #if SM_CONF_SYS_CDEFS_H "SM_CONF_SYS_CDEFS_H", #endif #if SM_CONF_SYSEXITS_H "SM_CONF_SYSEXITS_H", #endif #if SM_CONF_UID_GID "SM_CONF_UID_GID", #endif #if DO_NOT_USE_STRCPY "DO_NOT_USE_STRCPY", #endif #if SM_HEAP_CHECK "SM_HEAP_CHECK", #endif #if defined(SM_OS_NAME) && defined(__STDC__) "SM_OS=sm_os_" SM_OS_NAME, #endif #if SM_VA_STD "SM_VA_STD", #endif #if USEKSTAT "USEKSTAT", #endif #if USEPROCMEMINFO "USEPROCMEMINFO", #endif #if USESWAPCTL "USESWAPCTL", #endif NULL };
Upload File
Create Folder