Skip to content

Commit e16526d

Browse files
committed
Improve include order to help Solaris 11 build.
1 parent 668a4c7 commit e16526d

16 files changed

Lines changed: 30 additions & 38 deletions

lib/compat.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,16 @@
3434
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3535
*/
3636

37-
#include "zipconf.h"
38-
39-
#include "config.h"
40-
41-
#include <sys/stat.h>
42-
4337
/* to have *_MAX definitions for all types when compiling with g++ */
4438
#define __STDC_LIMIT_MACROS
4539

4640
/* to have ISO C secure library functions */
4741
#define __STDC_WANT_LIB_EXT1__ 1
4842

43+
#include "config.h"
44+
45+
#include <sys/stat.h>
46+
4947
#ifdef _WIN32
5048
#ifndef ZIP_EXTERN
5149
#ifndef ZIP_STATIC

lib/zip_buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436
#include <stdlib.h>
3537
#include <string.h>
3638

37-
#include "zipint.h"
38-
3939
zip_uint8_t *
4040
_zip_buffer_data(zip_buffer_t *buffer) {
4141
return buffer->data;

lib/zip_dir_add.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
3435

3536
#include <stdlib.h>
3637
#include <string.h>
3738

38-
#include "zipint.h"
39-
4039

4140
/* NOTE: Signed due to -1 on error. See zip_add.c for more details. */
4241

lib/zip_dirent.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436

3537
#include <stdio.h>
3638
#include <stdlib.h>
@@ -39,8 +41,6 @@
3941
#include <time.h>
4042
#include <zlib.h>
4143

42-
#include "zipint.h"
43-
4444
static zip_string_t *_zip_dirent_process_ef_utf_8(const zip_dirent_t *de, zip_uint16_t id, zip_string_t *str, bool check_consistency);
4545
static zip_extra_field_t *_zip_ef_utf8(zip_uint16_t, zip_string_t *, zip_error_t *);
4646
static bool _zip_dirent_process_winzip_aes(zip_dirent_t *de, zip_error_t *error);
@@ -1371,4 +1371,4 @@ zip_dirent_get_last_mod_mtime(zip_dirent_t *de) {
13711371
}
13721372

13731373
return de->last_mod_mtime;
1374-
}
1374+
}

lib/zip_error_strerror.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
*/
3333

3434

35+
#include "zipint.h"
36+
3537
#include <stdio.h>
3638
#include <stdlib.h>
3739
#include <string.h>
3840
#include <zlib.h>
3941

40-
#include "zipint.h"
41-
4242
ZIP_EXTERN const char *
4343
zip_error_strerror(zip_error_t *err) {
4444
const char *zip_error_string, *system_error_string;

lib/zip_error_to_str.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333

3434

3535
/* LCOV_EXCL_START */
36-
#include <stdio.h>
37-
#include <string.h>
38-
3936
#define _ZIP_COMPILING_DEPRECATED
4037
#include "zipint.h"
4138

39+
#include <stdio.h>
40+
#include <string.h>
41+
4242

4343
ZIP_EXTERN int
4444
zip_error_to_str(char *buf, zip_uint64_t len, int ze, int se) {

lib/zip_io_util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436
#include <limits.h>
3537
#include <stdlib.h>
3638
#include <string.h>
3739
#include <zlib.h>
3840

39-
#include "zipint.h"
40-
4141
int
4242
_zip_read(zip_source_t *src, zip_uint8_t *b, zip_uint64_t length, zip_error_t *error) {
4343
zip_int64_t n;

lib/zip_memdup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436
#include <stdlib.h>
3537
#include <string.h>
3638

37-
#include "zipint.h"
38-
3939

4040
void *
4141
_zip_memdup(const void *mem, size_t len, zip_error_t *error) {

lib/zip_source_buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436
#include <stdlib.h>
3537
#include <string.h>
3638

37-
#include "zipint.h"
38-
3939
#ifndef WRITE_FRAGMENT_SIZE
4040
#define WRITE_FRAGMENT_SIZE (64 * 1024)
4141
#endif

lib/zip_source_compress.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
*/
3333

34+
#include "zipint.h"
35+
3436
#include <stdlib.h>
3537
#include <string.h>
3638

37-
#include "zipint.h"
38-
3939
struct context {
4040
zip_error_t error;
4141

0 commit comments

Comments
 (0)