Seems like this line:

ret = g_strdup(buf);

Should be:

satadir = g_strdup(buf)

If it works I'll commit the change.

On 10/08/09 11:53 PM, "motiv4u" <[email protected]> wrote:

> Building on Windows lately fails with:
> 
> Compiling util.c
> util.c: In function `getDataDir':
> util.c:74: error: `ret' undeclared (first use in this function)
> util.c:74: error: (Each undeclared identifier is reported only once
> util.c:74: error: for each function it appears in.)
> mingw32-make: *** [../bin/obj/util.o] Error 1
> ** Build failed **
> 
> These are the lines:
> 
> #ifndef WIN32    
> datadir = g_strdup(DATADIR);  
> #else    
> char buf[FILENAME_MAX];  
> if (GetModuleFileName(NULL, buf, sizeof(buf)) != 0) {  
> char *p1 = strrchr(buf, '/'), *p2 = strrchr(buf, '\\'); 
> int pos1 = (p1 != NULL) ? (int)(p1 - buf) : -1; 
> int pos2 = (p2 != NULL) ? (int)(p2 - buf) : -1; 
> int pos = MAX(pos1, pos2); 
> if (pos > 0) 
> buf[pos] = '\0';
> ret = g_strdup(buf); 
> }  
> #endif    
> 
> 
> Any ideas?
> 
> N.




_______________________________________________
Bug-gnubg mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to