From: hyc Date: Sun, 14 Mar 2010 05:31:36 +0000 (+0000) Subject: Use HOMEPATH on Windows, not HOME X-Git-Tag: v2.4~186 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6edb752085c018f1fd43dc029cdc3e28255a1fe2;p=rtmpdump Use HOMEPATH on Windows, not HOME git-svn-id: svn://svn.mplayerhq.hu/rtmpdump/trunk@352 400ebc74-4327-4243-bc38-086b20814532 --- diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c index 8acba2d..60f006b 100644 --- a/librtmp/hashswf.c +++ b/librtmp/hashswf.c @@ -396,6 +396,12 @@ strtime(time_t * t, char *s) #define HEX2BIN(a) (((a)&0x40)?((a)&0xf)+9:((a)&0xf)) +#ifdef WIN32 +#define ENV_HOME "HOMEPATH" +#else +#define ENV_HOME "HOME" +#endif + int RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, int age) @@ -413,7 +419,7 @@ RTMP_HashSWF(const char *url, unsigned int *size, unsigned char *hash, HMAC_CTX ctx; date[0] = '\0'; - home = getenv("HOME"); + home = getenv(ENV_HOME); if (!home) home = ".";