Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 79939 | Differences between
and this patch

Collapse All | Expand All

(-)unistd.h.orig (+107 lines)
Lines 314-319 Link Here
314
__syscall_return(type,__res); \
314
__syscall_return(type,__res); \
315
}
315
}
316
316
317
#ifdef __PIC__
318
#define _syscall1(type,name,type1,arg1) \
319
type name(type1 arg1) \
320
{ \
321
long __res; \
322
__asm__ volatile (\
323
	"pushl %%ebx\n\t" \
324
	"movl %2,%%ebx\n\t" \
325
	"int $0x80\n\t" \
326
	"popl %%ebx\n\t" \
327
	: "=a" (__res) \
328
	: "0" (__NR_##name),"r" ((long)(arg1))); \
329
__syscall_return(type,__res); \
330
}
331
#else
317
#define _syscall1(type,name,type1,arg1) \
332
#define _syscall1(type,name,type1,arg1) \
318
type name(type1 arg1) \
333
type name(type1 arg1) \
319
{ \
334
{ \
Lines 323-329 Link Here
323
	: "0" (__NR_##name),"b" ((long)(arg1))); \
338
	: "0" (__NR_##name),"b" ((long)(arg1))); \
324
__syscall_return(type,__res); \
339
__syscall_return(type,__res); \
325
}
340
}
341
#endif
326
342
343
#ifdef __PIC__
344
#define _syscall2(type,name,type1,arg1,type2,arg2) \
345
type name(type1 arg1,type2 arg2) \
346
{ \
347
long __res; \
348
__asm__ volatile (\
349
	"pushl %%ebx\n\t" \
350
	"movl %2,%%ebx\n\t" \
351
	"int $0x80\n\t" \
352
	"popl %%ebx\n\t" \
353
	: "=a" (__res) \
354
	: "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2))); \
355
__syscall_return(type,__res); \
356
}
357
#else
327
#define _syscall2(type,name,type1,arg1,type2,arg2) \
358
#define _syscall2(type,name,type1,arg1,type2,arg2) \
328
type name(type1 arg1,type2 arg2) \
359
type name(type1 arg1,type2 arg2) \
329
{ \
360
{ \
Lines 333-339 Link Here
333
	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
364
	: "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \
334
__syscall_return(type,__res); \
365
__syscall_return(type,__res); \
335
}
366
}
367
#endif
336
368
369
#ifdef __PIC__
370
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
371
type name(type1 arg1,type2 arg2,type3 arg3) \
372
{ \
373
long __res; \
374
__asm__ volatile (\
375
	"pushl %%ebx\n\t" \
376
	"movl %2,%%ebx\n\t" \
377
	"int $0x80\n\t" \
378
	"popl %%ebx\n\t" \
379
	: "=a" (__res) \
380
	: "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \
381
		  "d" ((long)(arg3))); \
382
__syscall_return(type,__res); \
383
}
384
#else
337
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
385
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
338
type name(type1 arg1,type2 arg2,type3 arg3) \
386
type name(type1 arg1,type2 arg2,type3 arg3) \
339
{ \
387
{ \
Lines 344-350 Link Here
344
		  "d" ((long)(arg3))); \
392
		  "d" ((long)(arg3))); \
345
__syscall_return(type,__res); \
393
__syscall_return(type,__res); \
346
}
394
}
395
#endif
347
396
397
#ifdef __PIC__
398
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
399
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
400
{ \
401
long __res; \
402
__asm__ volatile (\
403
	"pushl %%ebx\n\t" \
404
	"movl %2,%%ebx\n\t" \
405
	"int $0x80\n\t" \
406
	"popl %%ebx\n\t" \
407
	: "=a" (__res) \
408
	: "0" (__NR_##name),"r" ((long)(arg1)),"c" ((long)(arg2)), \
409
	  "d" ((long)(arg3)),"S" ((long)(arg4))); \
410
__syscall_return(type,__res); \
411
} 
412
#else
348
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
413
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
349
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
414
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
350
{ \
415
{ \
Lines 355-361 Link Here
355
	  "d" ((long)(arg3)),"S" ((long)(arg4))); \
420
	  "d" ((long)(arg3)),"S" ((long)(arg4))); \
356
__syscall_return(type,__res); \
421
__syscall_return(type,__res); \
357
} 
422
} 
423
#endif
358
424
425
#ifdef __PIC__
426
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
427
	  type5,arg5) \
428
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
429
{ \
430
long __res; \
431
__asm__ volatile (\
432
	"pushl %%ebx\n\t" \
433
	"movl %2,%%ebx\n\t" \
434
	"int $0x80\n\t" \
435
	"popl %%ebx\n\t" \
436
	: "=a" (__res) \
437
	: "0" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \
438
	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
439
__syscall_return(type,__res); \
440
}
441
#else
359
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
442
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
360
	  type5,arg5) \
443
	  type5,arg5) \
361
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
444
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
Lines 367-373 Link Here
367
	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
450
	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
368
__syscall_return(type,__res); \
451
__syscall_return(type,__res); \
369
}
452
}
453
#endif
370
454
455
#ifdef __PIC__
456
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
457
	  type5,arg5,type6,arg6) \
458
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
459
{ \
460
long __res; \
461
__asm__ volatile (\
462
	"pushl %%ebp\n\t" \
463
	"movl %%eax,%%ebp\n\t" \
464
	"movl %1,%%eax\n\t" \
465
	"pushl %%ebx\n\t" \
466
	"movl %2,%%ebx\n\t" \
467
	"int $0x80\n\t" \
468
	"popl %%ebx\n\t" \
469
	"popl %%ebp\n\t" \
470
	: "=a" (__res) \
471
	: "i" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \
472
	  "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \
473
	  "0" ((long)(arg6))); \
474
__syscall_return(type,__res); \
475
}
476
#else
371
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
477
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
372
	  type5,arg5,type6,arg6) \
478
	  type5,arg5,type6,arg6) \
373
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
479
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
Lines 380-385 Link Here
380
	  "0" ((long)(arg6))); \
486
	  "0" ((long)(arg6))); \
381
__syscall_return(type,__res); \
487
__syscall_return(type,__res); \
382
}
488
}
489
#endif
383
490
384
#ifdef __KERNEL__
491
#ifdef __KERNEL__
385
#define __ARCH_WANT_IPC_PARSE_VERSION
492
#define __ARCH_WANT_IPC_PARSE_VERSION

Return to bug 79939