mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
On linux use a iso C (89) stdarg variable argument function.
Gcc no longer supports old style varargs.h
This commit is contained in:
parent
0a9e7d2db9
commit
0ada4a2e39
1 changed files with 13 additions and 0 deletions
|
@ -39,7 +39,11 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
|
||||||
* Generic control function
|
* Generic control function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
#include <stdarg.h>
|
||||||
|
#else
|
||||||
#include <varargs.h>
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
#include "isam_impl.h"
|
#include "isam_impl.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,17 +79,26 @@ static char sccsid[] = "@(#)iscntl.c 1.8 94/11/17";
|
||||||
|
|
||||||
typedef int (* intfunc)();
|
typedef int (* intfunc)();
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
int
|
||||||
|
iscntl(int isfd, int func, ...)
|
||||||
|
#else
|
||||||
int
|
int
|
||||||
iscntl(isfd, func, va_alist)
|
iscntl(isfd, func, va_alist)
|
||||||
int isfd;
|
int isfd;
|
||||||
int func;
|
int func;
|
||||||
va_dcl
|
va_dcl
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
extern int (*_isfatal_error_set_func())();
|
extern int (*_isfatal_error_set_func())();
|
||||||
va_list pvar;
|
va_list pvar;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
va_start(pvar, func);
|
||||||
|
#else
|
||||||
va_start(pvar);
|
va_start(pvar);
|
||||||
|
#endif
|
||||||
switch (func) {
|
switch (func) {
|
||||||
|
|
||||||
case ISCNTL_MASKSIGNALS:
|
case ISCNTL_MASKSIGNALS:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue