Commit f1343b2f authored by Yang Tse's avatar Yang Tse
Browse files

Force compilation failure in case macros sread() or swrite() are not defined.

parent 962b7985
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -70,6 +70,11 @@
#ifdef DJGPP
#define sread(x,y,z) (ssize_t)read_s((int)(x), (char *)(y), (int)(z))
#endif
#ifndef sread
  /* */
  Error Missing_definition_of_macro_sread
  /* */
#endif
#endif /* HAVE_RECV */

#ifdef HAVE_SEND
@@ -92,6 +97,11 @@
#ifdef DJGPP
#define swrite(x,y,z) (ssize_t)write_s((int)(x), (char *)(y), (int)(z))
#endif
#ifndef swrite
  /* */
  Error Missing_definition_of_macro_swrite
  /* */
#endif
#endif /* HAVE_SEND */


+10 −0
Original line number Diff line number Diff line
@@ -77,6 +77,11 @@
#ifdef DJGPP
#define sread(x,y,z) (ssize_t)read_s((int)(x), (char *)(y), (int)(z))
#endif
#ifndef sread
  /* */
  Error Missing_definition_of_macro_sread
  /* */
#endif
#endif /* HAVE_RECV */

#ifdef HAVE_SEND
@@ -99,6 +104,11 @@
#ifdef DJGPP
#define swrite(x,y,z) (ssize_t)write_s((int)(x), (char *)(y), (int)(z))
#endif
#ifndef swrite
  /* */
  Error Missing_definition_of_macro_swrite
  /* */
#endif
#endif /* HAVE_SEND */