forked from pool/dos2unix
f267b8dcfc
- Open all fds with O_CLOEXEC. OBS-URL: https://build.opensuse.org/request/show/70909 OBS-URL: https://build.opensuse.org/package/show/Base:System/dos2unix?expand=0&rev=31
38 lines
809 B
Diff
38 lines
809 B
Diff
--- dos2unix.c.orig
|
|
+++ dos2unix.c
|
|
@@ -158,8 +158,8 @@
|
|
#define R_CNTRL "rb"
|
|
#define W_CNTRL "wb"
|
|
#else
|
|
- #define R_CNTRL "r"
|
|
- #define W_CNTRL "w"
|
|
+ #define R_CNTRL "re"
|
|
+ #define W_CNTRL "we"
|
|
#endif
|
|
|
|
#define BINARY_FILE 0x1
|
|
--- unix2dos.c.orig
|
|
+++ unix2dos.c
|
|
@@ -148,8 +148,8 @@
|
|
#define R_CNTRL "rb"
|
|
#define W_CNTRL "wb"
|
|
#else
|
|
- #define R_CNTRL "r"
|
|
- #define W_CNTRL "w"
|
|
+ #define R_CNTRL "re"
|
|
+ #define W_CNTRL "we"
|
|
#endif
|
|
|
|
#define BINARY_FILE 0x1
|
|
--- Makefile.orig
|
|
+++ Makefile
|
|
@@ -198,7 +198,7 @@ endif
|
|
|
|
CFLAGS = -O2 -Wall $(RPM_OPT_FLAGS)
|
|
|
|
-EXTRA_CFLAGS = -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
|
|
+EXTRA_CFLAGS = -D_GNU_SOURCE -DVER_REVISION=\"$(DOS2UNIX_VERSION)\" \
|
|
-DVER_DATE=\"$(DOS2UNIX_DATE)\" \
|
|
-DDEBUG=$(DEBUG) \
|
|
$(CFLAGS_OS)
|