Changeset 902 for trunk/server/source3


Ignore:
Timestamp:
Apr 1, 2016, 8:48:05 PM (9 years ago)
Author:
Silvan Scherrer
Message:

samba server: remove -Zbin-files, more bin work done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/lib/system.c

    r874 r902  
    817817int sys_open(const char *path, int oflag, mode_t mode)
    818818{
     819        int oflagNew = 0;
     820#ifdef __OS2__
     821        oflagNew = oflag | O_BINARY;
     822#else
     823        oflagNew = oflag;
     824#endif
    819825#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OPEN64)
    820         return open64(path, oflag, mode);
    821 #else
    822         return open(path, oflag, mode);
     826        return open64(path, oflagNew, mode);
     827#else
     828        return open(path, oflagNew, mode);
    823829#endif
    824830}
     
    830836FILE *sys_fopen(const char *path, const char *type)
    831837{
     838#ifdef __OS2__
     839        FILE *fd = NULL;
     840        char *typeNew = malloc(strlen(type) +2);
     841        if (typeNew == NULL)
     842           return fopen(path, type);
     843
     844        memset(typeNew, '\0', sizeof(typeNew));
     845        strncpy(typeNew, type, strlen(type));
     846        strncat (typeNew, (const char*)'b', 1);
     847        fd = fopen(path, typeNew);
     848        free(typeNew);
     849        return fd;
     850#else
     851
    832852#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FOPEN64)
    833853        return fopen64(path, type);
    834854#else
    835855        return fopen(path, type);
     856#endif
     857
    836858#endif
    837859}
Note: See TracChangeset for help on using the changeset viewer.