mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 00:05:03 -05:00
Remove/replace non-gcc compiler-specific defines and pragmas
Remove MSVC-specific defines and pragmas, use __attribute__((packed)) where needed.
This commit is contained in:
parent
3dd76cf9e9
commit
d8a9772afc
6
src/io.c
6
src/io.c
@ -2,12 +2,6 @@
|
||||
* Generic IO handling for files/sockets/etc
|
||||
*/
|
||||
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS 1601
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
#pragma warning(disable: 4996)
|
||||
|
||||
#ifdef LARGE_FILE
|
||||
# define _LARGEFILE_SOURCE
|
||||
# define _LARGEFILE64_SOURCE
|
||||
|
@ -12,19 +12,12 @@
|
||||
|
||||
#include "ff-plugins.h"
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||
# define _PACKED __attribute((packed))
|
||||
#else
|
||||
# define _PACKED
|
||||
#endif
|
||||
|
||||
typedef struct tag_scan_id3header {
|
||||
unsigned char id[3];
|
||||
unsigned char version[2];
|
||||
unsigned char flags;
|
||||
unsigned char size[4];
|
||||
} _PACKED SCAN_ID3HEADER;
|
||||
#pragma pack()
|
||||
} __attribute__((packed)) SCAN_ID3HEADER;
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE 1
|
||||
|
@ -223,26 +223,20 @@ WMA_GUID wma_guidlist[] = {
|
||||
{ NULL, NULL, "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0" }
|
||||
};
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||
# define _PACKED __attribute((packed))
|
||||
#else
|
||||
# define _PACKED
|
||||
#endif
|
||||
#define MAYBEFREE(x) { free((x)); }
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct tag_wma_header {
|
||||
unsigned char objectid[16];
|
||||
unsigned long long size;
|
||||
unsigned int objects;
|
||||
char reserved1;
|
||||
char reserved2;
|
||||
} _PACKED WMA_HEADER;
|
||||
} __attribute__((packed)) WMA_HEADER;
|
||||
|
||||
typedef struct tag_wma_subheader {
|
||||
unsigned char objectid[16];
|
||||
long long size;
|
||||
} _PACKED WMA_SUBHEADER;
|
||||
} __attribute__((packed)) WMA_SUBHEADER;
|
||||
|
||||
typedef struct tag_wma_stream_properties {
|
||||
unsigned char stream_type[16];
|
||||
@ -252,15 +246,13 @@ typedef struct tag_wma_stream_properties {
|
||||
unsigned int ecdl;
|
||||
unsigned short int flags;
|
||||
unsigned int reserved;
|
||||
} _PACKED WMA_STREAM_PROP;
|
||||
} __attribute__((packed)) WMA_STREAM_PROP;
|
||||
|
||||
typedef struct tag_wma_header_extension {
|
||||
unsigned char reserved_1[16];
|
||||
unsigned short int reserved_2;
|
||||
unsigned int data_size;
|
||||
} _PACKED WMA_HEADER_EXT;
|
||||
|
||||
#pragma pack()
|
||||
} __attribute__((packed)) WMA_HEADER_EXT;
|
||||
|
||||
/*
|
||||
* Forwards
|
||||
|
Loading…
Reference in New Issue
Block a user