X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=platform.h;h=025aa980b6e7811c16a2b677b4b44642f24d1894;hp=27abc644fc5b7eb23f3cbf4bef376b7fc253b1ae;hb=641136fee3e2f589f93ad6a7b3213b0247107303;hpb=92c0d6157c3d6b24ffff811a989572e2ae6d92f9 diff --git a/platform.h b/platform.h index 27abc64..025aa98 100644 --- a/platform.h +++ b/platform.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012, 2013 + * Copyright (C) 2012, 2013, 2014 * Dale Weiler * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -60,14 +60,13 @@ int dd_stat; char dd_name[1]; } DIR; - -# ifdef S_ISDIR -# undef S_ISDIR -# endif /*! S_ISDIR */ -# define S_ISDIR(X) ((X)&_S_IFDIR) # else # include # endif /*!__MINGW32__*/ + +# ifndef S_ISDIR +# define S_ISDIR(X) ((X)&_S_IFDIR) +# endif #else # include # include @@ -186,24 +185,6 @@ const char *platform_ctime(const time_t *timer); */ char *platform_strncat(char *dest, const char *src, size_t num); -/* - * Function: platform_tmpnam - * Generates names you can use to create temporary files. - * - * Parameters: - * str - Pointer that will hold the generated name and will be identical - * to the name returned by the function. This is a convenient way - * to save the generated name. - * - * Returns: - * Pointer to the name generate or *NULL* if there is a failure. Failure - * can occur if you attempt more than TMP_MAX calls. - * - * Remarks: - * Returns a name unique in the current workign directory. - */ -const char *platform_tmpnam(char *str); - /* * Function: platform_getenv * Get a value from the current enviroment. @@ -217,7 +198,7 @@ const char *platform_tmpnam(char *str); * pointer. The return value is *NULL* if `var` is not found in the * enviroment table. */ -const char *platform_getenv(char *var); +const char *platform_getenv(const char *var); /* * Function: platform_vasprintf