\hypertarget{group__Evil__Stdlib__Group}{}\doxysection{Stdlib.\+h functions.}
\label{group__Evil__Stdlib__Group}\index{Stdlib.h functions.@{Stdlib.h functions.}}


This header provides functions ported from Unix in stdlib.\+h.  


\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga766c36c79f161c16b99308ad8e05e455}\label{group__Evil__Stdlib__Group_ga766c36c79f161c16b99308ad8e05e455}} 
\#define {\bfseries HAVE\+\_\+\+REALPATH}~1
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv}} (const char $\ast$name, const char $\ast$value, int overwrite)
\begin{DoxyCompactList}\small\item\em Create, modify, or remove environment variables. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil__Stdlib__Group_ga17a3a11d20a551951a4acbc3872b280c}{unsetenv}} (const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Remove environment variables. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Evil__Stdlib__Group_ga1251526bfc32a1b8a5263bfa352254e2}{mkdtemp}} (char $\ast$\+\_\+\+\_\+template)
\begin{DoxyCompactList}\small\item\em create an unique temporary directory \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Evil__Stdlib__Group_ga3cd3b72ac138782cad52c08cd4bdfc86}{mkstemps}} (char $\ast$\+\_\+\+\_\+template, int suffixlen)
\begin{DoxyCompactList}\small\item\em Create a unique temporary file name with a suffix. \end{DoxyCompactList}\item 
char $\ast$ \mbox{\hyperlink{group__Evil__Stdlib__Group_gafefd37e884231d4b4efe6a3edfdd53d9}{realpath}} (const char $\ast$file\+\_\+name, char $\ast$resolved\+\_\+name)
\begin{DoxyCompactList}\small\item\em Return an absolute or full path name for a specified relative path name. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This header provides functions ported from Unix in stdlib.\+h. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}\label{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!setenv@{setenv}}
\index{setenv@{setenv}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{setenv()}{setenv()}}
{\footnotesize\ttfamily int setenv (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name,  }\item[{const char $\ast$}]{value,  }\item[{int}]{overwrite }\end{DoxyParamCaption})}



Create, modify, or remove environment variables. 


\begin{DoxyParams}{Parameters}
{\em name} & The name of the environment variable. \\
\hline
{\em value} & The value of the environment variable to set. \\
\hline
{\em overwrite} & 0 to let the environment variable unchanged, 1 otherwise. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise.
\end{DoxyReturn}
Add the new environment variable {\ttfamily name} or modify its value if it exists, and set it to {\ttfamily value}. Environment variables define the environment in which a process executes. If {\ttfamily value} is {\ttfamily NULL}, the variable is removed (unset) and that call is equivalent to \mbox{\hyperlink{group__Evil__Stdlib__Group_ga17a3a11d20a551951a4acbc3872b280c}{unsetenv()}}.If the environment variable named by {\ttfamily name} already exists and the value of {\ttfamily overwrite} is 0, the function shall return success and the environment shall remain unchanged. If the function succeeds, it returns 0, otherwise it returns -\/1.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. 

Referenced by ecore\+\_\+drm\+\_\+tty\+\_\+open(), ecore\+\_\+wl2\+\_\+display\+\_\+create(), and unsetenv().

\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga17a3a11d20a551951a4acbc3872b280c}\label{group__Evil__Stdlib__Group_ga17a3a11d20a551951a4acbc3872b280c}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!unsetenv@{unsetenv}}
\index{unsetenv@{unsetenv}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{unsetenv()}{unsetenv()}}
{\footnotesize\ttfamily int unsetenv (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Remove environment variables. 


\begin{DoxyParams}{Parameters}
{\em name} & The name of the environment variable. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise.
\end{DoxyReturn}
Remove the new environment variable {\ttfamily name} if it exists. That function is equivalent to \mbox{\hyperlink{group__Evil__Stdlib__Group_ga1c8b16a3abcb4dc450a0a62b42c554dd}{setenv()}} with its second parameter to {\ttfamily NULL} and the third to 1. If the function succeeds, it returns 0, otherwise it returns -\/1.

Conformity\+: Non applicable.

Supported OS\+: Windows XP. 

References setenv().



Referenced by ecore\+\_\+drm\+\_\+tty\+\_\+close(), and ecore\+\_\+fork\+\_\+reset().

\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga1251526bfc32a1b8a5263bfa352254e2}\label{group__Evil__Stdlib__Group_ga1251526bfc32a1b8a5263bfa352254e2}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!mkdtemp@{mkdtemp}}
\index{mkdtemp@{mkdtemp}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{mkdtemp()}{mkdtemp()}}
{\footnotesize\ttfamily char$\ast$ mkdtemp (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+template }\end{DoxyParamCaption})}



create an unique temporary directory 

\begin{DoxySince}{Since}
1.\+8.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Evil__Stdlib__Group_ga3cd3b72ac138782cad52c08cd4bdfc86}\label{group__Evil__Stdlib__Group_ga3cd3b72ac138782cad52c08cd4bdfc86}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!mkstemps@{mkstemps}}
\index{mkstemps@{mkstemps}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{mkstemps()}{mkstemps()}}
{\footnotesize\ttfamily int mkstemps (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+template,  }\item[{int}]{suffixlen }\end{DoxyParamCaption})}



Create a unique temporary file name with a suffix. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+\+\_\+template} & Template of the file to create. \\
\hline
{\em suffixlen} & Length of the suffix following the \textquotesingle{}XXXXXX\textquotesingle{} placeholder. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A file descriptor on success, -\/1 otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+10.\+0 
\end{DoxySince}
\mbox{\Hypertarget{group__Evil__Stdlib__Group_gafefd37e884231d4b4efe6a3edfdd53d9}\label{group__Evil__Stdlib__Group_gafefd37e884231d4b4efe6a3edfdd53d9}} 
\index{Stdlib.h functions.@{Stdlib.h functions.}!realpath@{realpath}}
\index{realpath@{realpath}!Stdlib.h functions.@{Stdlib.h functions.}}
\doxysubsubsection{\texorpdfstring{realpath()}{realpath()}}
{\footnotesize\ttfamily char$\ast$ realpath (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file\+\_\+name,  }\item[{char $\ast$}]{resolved\+\_\+name }\end{DoxyParamCaption})}



Return an absolute or full path name for a specified relative path name. 


\begin{DoxyParams}{Parameters}
{\em file\+\_\+name} & The absolute path name. \\
\hline
{\em resolved\+\_\+name} & The relative path name. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily NULL} on failure, a pointer to the absolute path name otherwise.
\end{DoxyReturn}
The function expands the relative path name {\ttfamily file\+\_\+name} to its fully qualified or absolute path and store it in the buffer pointed by {\ttfamily resolved\+\_\+name}. The buffer is at most {\ttfamily PATH\+\_\+\+MAX} bytes long. If {\ttfamily resolved\+\_\+name} is {\ttfamily NULL}, malloc() is used to allocate a buffer of sufficient length to hold the path name. In that case, it is the responsibility of the caller to free this buffer with free().

That function can be used to obtain the absolute path name for relative paths (rel\+Path) that include \char`\"{}./\char`\"{} or \char`\"{}../\char`\"{} in their names.

On Windows XP, errno is set in the following cases\+:

\begin{DoxyItemize}
\item EACCESS\+: if {\ttfamily file\+\_\+name} can not be accessed. \item EINVAL\+: if {\ttfamily file\+\_\+name} is {\ttfamily NULL}. \item ENAMETOOLONG\+: if the path name is too long. \item ENOENT\+: {\ttfamily file\+\_\+name} does not exist \item ENOMEM\+: if memory allocation fails.\end{DoxyItemize}
Conformity\+: None.

Supported OS\+: Windows XP. 

Referenced by eina\+\_\+prefix\+\_\+new().

