Skip to content

Commit ed37393

Browse files
committed
Hide __attribute__ from MSVC
1 parent fbe0a74 commit ed37393

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

contrib/pgpro_scheduler/src/cron_string.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ typedef struct {
4141
} cron_ent_t;
4242

4343
void destroyCronEnt(cron_ent_t *);
44-
void _cps_set_error(int num, const char *message, ...) __attribute__ ((format (gnu_printf, 2, 3)));;
44+
void _cps_set_error(int num, const char *message, ...)
45+
#ifdef __GNUC__
46+
__attribute__ ((format (gnu_printf, 2, 3)))
47+
#endif
48+
;;
4549
char *get_cps_error(void);
4650
int _cps_string_has(char *str, char c);
4751
char *_cps_append_string(char *str, char *to_add);

contrib/pgpro_scheduler/src/scheduler_job.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ typedef struct {
3030
job_t *init_scheduler_job(job_t *j);
3131
job_t *get_expired_jobs(char *nodename, int *n, int *is_error);
3232
job_t *get_jobs_to_do(char *nodename, int *n, int *is_error);
33-
job_t *set_job_error(job_t *j, const char *fmt, ...) __attribute__ ((format (gnu_printf, 2, 3)));;
33+
job_t *set_job_error(job_t *j, const char *fmt, ...)
34+
#ifdef __GNUC__
35+
__attribute__ ((format (gnu_printf, 2, 3)));
36+
#endif
37+
;
3438
int move_job_to_log(job_t *j, bool status);
3539
void destroy_job(job_t *j, int selfdestroy);
3640

0 commit comments

Comments
 (0)