Skip to content

Commit 9b18a11

Browse files
authored
Merge pull request #26 from jasper-software/lto-fix
Fix build with link-time optimization
2 parents 20ccd8f + c679fa8 commit 9b18a11

File tree

12 files changed

+19
-36
lines changed

12 files changed

+19
-36
lines changed

src/xv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#define MAIN
88
#define NEEDSTIME
9-
#define NEEDSDIR /* for value of MAXPATHLEN */
109

1110
#include "xv.h"
1211

src/xv.h

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -299,31 +299,26 @@
299299

300300

301301

302-
#ifdef NEEDSDIR
303-
# ifdef VMS
304-
# include <descrip.h>
305-
# include <stat.h>
306-
# include "dirent.h"
302+
#ifdef VMS
303+
# include <descrip.h>
304+
# include <stat.h>
305+
# include "dirent.h"
306+
#else
307+
# ifdef NODIRENT
308+
# include <sys/dir.h>
307309
# else
308-
# ifdef NODIRENT
309-
# include <sys/dir.h>
310-
# else
311-
# include <dirent.h>
312-
# endif
313-
314-
# if defined(SVR4) || defined(SYSV)
315-
# include <fcntl.h>
316-
# endif
317-
318-
# include <sys/param.h>
319-
# include <sys/stat.h>
320-
321-
# if defined(__convex__) && defined (__STDC__)
322-
# define S_IFMT _S_IFMT
323-
# define S_IFDIR _S_IFDIR
324-
# define S_IFCHR _S_IFCHR
325-
# define S_IFBLK _S_IFBLK
326-
# endif
310+
# include <dirent.h>
311+
# endif
312+
# if defined(SVR4) || defined(SYSV)
313+
# include <fcntl.h>
314+
# endif
315+
# include <sys/param.h>
316+
# include <sys/stat.h>
317+
# if defined(__convex__) && defined (__STDC__)
318+
# define S_IFMT _S_IFMT
319+
# define S_IFDIR _S_IFDIR
320+
# define S_IFCHR _S_IFCHR
321+
# define S_IFBLK _S_IFBLK
327322
# endif
328323
#endif
329324

src/xvbrowse.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "copyright.h"
1919

20-
#define NEEDSDIR
2120
#include "xv.h"
2221
#include <unistd.h> /* access() */
2322

src/xvcut.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
*/
4848

4949

50-
#define NEEDSDIR /* for stat() */
5150
#include "copyright.h"
5251
#include "xv.h"
5352

src/xvdir.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "copyright.h"
2525

2626
#define NEEDSTIME /* for CheckPoll */
27-
#define NEEDSDIR
2827
#include "xv.h"
2928

3029
#include "bits/d_load"

src/xvfits.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* provided "as is" without express or implied warranty.
1515
*/
1616

17-
#define NEEDSDIR /* for S_IRUSR|S_IWUSR */
1817
#include "xv.h"
1918

2019
#define NCARDS (36)

src/xvimage.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
*/
3131
/* #define ENABLE_FIXPIX_SMOOTH */ /* GRR 19980607: moved into xv.h */
3232

33-
#define NEEDSDIR /* for S_IRUSR|S_IWUSR */
3433
#include "copyright.h"
3534

3635
#include "xv.h"

src/xvmgcsfx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
* 同様に書き込み時にも問題が生じるかもしれない。
6161
*/
6262

63-
#define NEEDSDIR /* for stat() */
6463
#include "xv.h"
6564

6665

src/xvpds.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
* This software is provided "as is" without any express or implied warranty.
102102
*/
103103

104-
#define NEEDSDIR /* for S_IRUSR|S_IWUSR */
105104
#include "xv.h"
106105

107106
#ifdef HAVE_PDS

src/xvpic2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
*/
6262

6363
#define PIC2_IGNORE_UNUSED_FUNCTIONS
64-
#define NEEDSDIR
6564

6665
#include "xv.h"
6766
#include <setjmp.h>

0 commit comments

Comments
 (0)