patch-2.1.30 linux/include/asm-sparc64/termios.h

Next file: linux/include/asm-sparc64/uaccess.h
Previous file: linux/include/asm-sparc64/system.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.29/linux/include/asm-sparc64/termios.h linux/include/asm-sparc64/termios.h
@@ -1,4 +1,4 @@
-/* $Id: termios.h,v 1.3 1996/12/31 22:35:49 davem Exp $ */
+/* $Id: termios.h,v 1.4 1997/03/14 21:05:26 jj Exp $ */
 #ifndef _SPARC64_TERMIOS_H
 #define _SPARC64_TERMIOS_H
 
@@ -87,7 +87,7 @@
  * Translate a "termio" structure into a "termios". Ugh.
  */
 #define user_termio_to_kernel_termios(termios, termio) \
-do { \
+({ \
 	unsigned short tmp; \
 	get_user(tmp, &(termio)->c_iflag); \
 	(termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \
@@ -98,7 +98,8 @@
 	get_user(tmp, &(termio)->c_lflag); \
 	(termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \
 	copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
-} while(0)
+	0; \
+})
 
 /*
  * Translate a "termios" structure into a "termio". Ugh.
@@ -106,7 +107,7 @@
  * Note the "fun" _VMIN overloading.
  */
 #define kernel_termios_to_user_termio(termio, termios) \
-do { \
+({ \
 	put_user((termios)->c_iflag, &(termio)->c_iflag); \
 	put_user((termios)->c_oflag, &(termio)->c_oflag); \
 	put_user((termios)->c_cflag, &(termio)->c_cflag); \
@@ -117,10 +118,11 @@
 		put_user((termios)->c_cc[VMIN], &(termio)->c_cc[_VMIN]); \
 		put_user((termios)->c_cc[VTIME], &(termio)->c_cc[_VTIME]); \
 	} \
-} while(0)
+	0; \
+})
 
 #define user_termios_to_kernel_termios(k, u) \
-do { \
+({ \
 	get_user((k)->c_iflag, &(u)->c_iflag); \
 	get_user((k)->c_oflag, &(u)->c_oflag); \
 	get_user((k)->c_cflag, &(u)->c_cflag); \
@@ -134,10 +136,11 @@
 		get_user((k)->c_cc[VMIN],  &(u)->c_cc[_VMIN]); \
 		get_user((k)->c_cc[VTIME], &(u)->c_cc[_VTIME]); \
 	} \
-} while(0)
+	0; \
+})
 
 #define kernel_termios_to_user_termios(u, k) \
-do { \
+({ \
 	put_user((k)->c_iflag, &(u)->c_iflag); \
 	put_user((k)->c_oflag, &(u)->c_oflag); \
 	put_user((k)->c_cflag, &(u)->c_cflag); \
@@ -151,7 +154,8 @@
 		put_user((k)->c_cc[VEOF], &(u)->c_cc[VEOF]); \
 		put_user((k)->c_cc[VEOL], &(u)->c_cc[VEOL]); \
 	} \
-} while(0)
+	0; \
+})
 
 #endif	/* __KERNEL__ */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov