Changeset 10762

Show
Ignore:
Timestamp:
25.10.2005 15:01:59 (14 years ago)
Author:
kjdon
Message:

added a 0 as teh last parameter to gdbm_open, line 102. this seems to be needed to make it work under windows. hope it still works under linux :-)

Location:
trunk/gsdl3
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/packages/javagdbm/jni/gdbmjava.c

    r10753 r10762  
    9191    GDBM_FILE dbf; 
    9292    const char *utfFileName; 
    93  
     93    
    9494    utfFileName = (*env)->GetStringUTFChars(env, fileName, 0); 
    9595    if (!utfFileName)  
     
    9797     
    9898    setbuf(stderr, 0); 
    99  
     99    
    100100    /* XXX: Should we let the caller specify the file mode?  I think 
    101101     * not -- Java is above the level of octal file modes. [mbp] */ 
    102     dbf = gdbm_open((char *) utfFileName, 0, flags, 0660, NULL); 
    103  
     102    dbf = gdbm_open((char *) utfFileName, 0, flags, 0660, NULL, 0); 
     103    
    104104    if (utfFileName) 
    105105    (*env)->ReleaseStringUTFChars(env, fileName, utfFileName); 
     
    109109    return 0; 
    110110    }    
    111  
     111    
    112112    return DBF_TO_JLONG(dbf); 
    113113} 
  • trunk/gsdl3/src/packages/javagdbm/jni/gdbmjava.c

    r10753 r10762  
    9191    GDBM_FILE dbf; 
    9292    const char *utfFileName; 
    93  
     93    
    9494    utfFileName = (*env)->GetStringUTFChars(env, fileName, 0); 
    9595    if (!utfFileName)  
     
    9797     
    9898    setbuf(stderr, 0); 
    99  
     99    
    100100    /* XXX: Should we let the caller specify the file mode?  I think 
    101101     * not -- Java is above the level of octal file modes. [mbp] */ 
    102     dbf = gdbm_open((char *) utfFileName, 0, flags, 0660, NULL); 
    103  
     102    dbf = gdbm_open((char *) utfFileName, 0, flags, 0660, NULL, 0); 
     103    
    104104    if (utfFileName) 
    105105    (*env)->ReleaseStringUTFChars(env, fileName, utfFileName); 
     
    109109    return 0; 
    110110    }    
    111  
     111    
    112112    return DBF_TO_JLONG(dbf); 
    113113}