Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com X-Authentication-Warning: hp2.xraylith.wisc.edu: khan owned process doing -bs Date: Fri, 7 Jan 2000 13:08:27 -0600 (CST) From: Mumit Khan To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: use of __builtin_memset Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I see that the use of __builtin_memset has been turned on in the last winsup snapshot, which breaks building under gcc-2.95.x, which doesn't really support it. Interestingly enough, gcc-2.95.2 seems to have __builtin_memset in its code, but c++ front-end rejects the code unless properly prototyped. A good way to handle this is to use autoconf. Here's how you can do this in configure.in: # Test for builtin mem* functions. AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([ #include void foo (char *s, int c, size_t n) { __builtin_memset(s, c, n); } ], [ ], use_builtin_memset=yes, use_builtin_memset=no) if test "$use_builtin_memset" = "yes"; then AC_DEFINE(WINSUP_HAS_BUILTIN_MEMSET) fi AC_LANG_RESTORE and so on for all the other builtin's that are "new". If there are going to be more, then we should consider the use of config.h{.in} and using that instead of passing cpp macros flags on the command line. I can work up a patch if interested. Regards, Mumit