Print this page
remove support for non-ANSI compilation
*** 18,36 ****
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SEMAPHORE_H
#define _SEMAPHORE_H
- #pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/feature_tests.h>
#include <sys/types.h>
#include <sys/fcntl.h>
--- 18,36 ----
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SEMAPHORE_H
#define _SEMAPHORE_H
#include <sys/feature_tests.h>
#include <sys/types.h>
#include <sys/fcntl.h>
*** 50,60 ****
#define SEM_FAILED ((sem_t *)(-1))
/*
* function prototypes
*/
- #if defined(__STDC__)
int sem_init(sem_t *, int, unsigned int);
int sem_destroy(sem_t *);
sem_t *sem_open(const char *, int, ...);
int sem_close(sem_t *);
int sem_unlink(const char *);
--- 50,59 ----
*** 73,97 ****
const struct timespec *_RESTRICT_KYWD);
#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
int sem_trywait(sem_t *);
int sem_post(sem_t *);
int sem_getvalue(sem_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
- #else
- int sem_init();
- int sem_destroy();
- sem_t *sem_open();
- int sem_close();
- int sem_unlink();
- int sem_wait();
- #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
- int sem_timedwait();
- int sem_reltimedwait_np();
- #endif /* #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
- int sem_trywait();
- int sem_post();
- int sem_getvalue();
- #endif /* __STDC__ */
#ifdef __cplusplus
}
#endif
--- 72,81 ----