Changeset 902 for trunk/server/source3
- Timestamp:
- Apr 1, 2016, 8:48:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/lib/system.c
r874 r902 817 817 int sys_open(const char *path, int oflag, mode_t mode) 818 818 { 819 int oflagNew = 0; 820 #ifdef __OS2__ 821 oflagNew = oflag | O_BINARY; 822 #else 823 oflagNew = oflag; 824 #endif 819 825 #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); 823 829 #endif 824 830 } … … 830 836 FILE *sys_fopen(const char *path, const char *type) 831 837 { 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 832 852 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FOPEN64) 833 853 return fopen64(path, type); 834 854 #else 835 855 return fopen(path, type); 856 #endif 857 836 858 #endif 837 859 }
Note:
See TracChangeset
for help on using the changeset viewer.