Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: lss/linux_syscall_support.h

Issue 10536175: Fix to compile successfully with -Wundef (Closed) Base URL: https://linux-syscall-support.googlecode.com/svn/trunk
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2005-2011, Google Inc. 1 /* Copyright (c) 2005-2011, Google Inc.
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 #define __NR_move_pages 301 1339 #define __NR_move_pages 301
1340 #endif 1340 #endif
1341 #ifndef __NR_getcpu 1341 #ifndef __NR_getcpu
1342 #define __NR_getcpu 302 1342 #define __NR_getcpu 302
1343 #endif 1343 #endif
1344 /* End of powerpc defininitions */ 1344 /* End of powerpc defininitions */
1345 #endif 1345 #endif
1346 1346
1347 1347
1348 /* After forking, we must make sure to only call system calls. */ 1348 /* After forking, we must make sure to only call system calls. */
1349 #if __BOUNDED_POINTERS__ 1349 #if defined(__BOUNDED_POINTERS__)
1350 #error "Need to port invocations of syscalls for bounded ptrs" 1350 #error "Need to port invocations of syscalls for bounded ptrs"
1351 #else 1351 #else
1352 /* The core dumper and the thread lister get executed after threads 1352 /* The core dumper and the thread lister get executed after threads
1353 * have been suspended. As a consequence, we cannot call any functions 1353 * have been suspended. As a consequence, we cannot call any functions
1354 * that acquire locks. Unfortunately, libc wraps most system calls 1354 * that acquire locks. Unfortunately, libc wraps most system calls
1355 * (e.g. in order to implement pthread_atfork, and to make calls 1355 * (e.g. in order to implement pthread_atfork, and to make calls
1356 * cancellable), which means we cannot call these functions. Instead, 1356 * cancellable), which means we cannot call these functions. Instead,
1357 * we have to call syscall() directly. 1357 * we have to call syscall() directly.
1358 */ 1358 */
1359 #undef LSS_ERRNO 1359 #undef LSS_ERRNO
(...skipping 12 matching lines...) Expand all
1372 #else 1372 #else
1373 #define LSS_INLINE static inline 1373 #define LSS_INLINE static inline
1374 #endif 1374 #endif
1375 1375
1376 /* Allow the including file to override the prefix used for all new 1376 /* Allow the including file to override the prefix used for all new
1377 * system calls. By default, it will be set to "sys_". 1377 * system calls. By default, it will be set to "sys_".
1378 */ 1378 */
1379 #undef LSS_NAME 1379 #undef LSS_NAME
1380 #ifndef SYS_PREFIX 1380 #ifndef SYS_PREFIX
1381 #define LSS_NAME(name) sys_##name 1381 #define LSS_NAME(name) sys_##name
1382 #elif SYS_PREFIX < 0 1382 #elif defined(SYS_PREFIX) && SYS_PREFIX < 0
1383 #define LSS_NAME(name) name 1383 #define LSS_NAME(name) name
1384 #elif SYS_PREFIX == 0 1384 #elif defined(SYS_PREFIX) && SYS_PREFIX == 0
1385 #define LSS_NAME(name) sys0_##name 1385 #define LSS_NAME(name) sys0_##name
1386 #elif SYS_PREFIX == 1 1386 #elif defined(SYS_PREFIX) && SYS_PREFIX == 1
1387 #define LSS_NAME(name) sys1_##name 1387 #define LSS_NAME(name) sys1_##name
1388 #elif SYS_PREFIX == 2 1388 #elif defined(SYS_PREFIX) && SYS_PREFIX == 2
1389 #define LSS_NAME(name) sys2_##name 1389 #define LSS_NAME(name) sys2_##name
1390 #elif SYS_PREFIX == 3 1390 #elif defined(SYS_PREFIX) && SYS_PREFIX == 3
1391 #define LSS_NAME(name) sys3_##name 1391 #define LSS_NAME(name) sys3_##name
1392 #elif SYS_PREFIX == 4 1392 #elif defined(SYS_PREFIX) && SYS_PREFIX == 4
1393 #define LSS_NAME(name) sys4_##name 1393 #define LSS_NAME(name) sys4_##name
1394 #elif SYS_PREFIX == 5 1394 #elif defined(SYS_PREFIX) && SYS_PREFIX == 5
1395 #define LSS_NAME(name) sys5_##name 1395 #define LSS_NAME(name) sys5_##name
1396 #elif SYS_PREFIX == 6 1396 #elif defined(SYS_PREFIX) && SYS_PREFIX == 6
1397 #define LSS_NAME(name) sys6_##name 1397 #define LSS_NAME(name) sys6_##name
1398 #elif SYS_PREFIX == 7 1398 #elif defined(SYS_PREFIX) && SYS_PREFIX == 7
1399 #define LSS_NAME(name) sys7_##name 1399 #define LSS_NAME(name) sys7_##name
1400 #elif SYS_PREFIX == 8 1400 #elif defined(SYS_PREFIX) && SYS_PREFIX == 8
1401 #define LSS_NAME(name) sys8_##name 1401 #define LSS_NAME(name) sys8_##name
1402 #elif SYS_PREFIX == 9 1402 #elif defined(SYS_PREFIX) && SYS_PREFIX == 9
1403 #define LSS_NAME(name) sys9_##name 1403 #define LSS_NAME(name) sys9_##name
1404 #endif 1404 #endif
1405 1405
1406 #undef LSS_RETURN 1406 #undef LSS_RETURN
1407 #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) \ 1407 #if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) \
1408 || defined(__ARM_EABI__)) 1408 || defined(__ARM_EABI__))
1409 /* Failing system calls return a negative result in the range of 1409 /* Failing system calls return a negative result in the range of
1410 * -1..-4095. These are "errno" values with the sign inverted. 1410 * -1..-4095. These are "errno" values with the sign inverted.
1411 */ 1411 */
1412 #define LSS_RETURN(type, res) \ 1412 #define LSS_RETURN(type, res) \
(...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after
3513 } 3513 }
3514 #endif 3514 #endif
3515 #endif 3515 #endif
3516 3516
3517 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS) 3517 #if defined(__cplusplus) && !defined(SYS_CPLUSPLUS)
3518 } 3518 }
3519 #endif 3519 #endif
3520 3520
3521 #endif 3521 #endif
3522 #endif 3522 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698