3 dnl CHECK_NEED_REENTRANT_STRERROR_R
4 dnl -------------------------------------------------
5 dnl Checks if the preprocessor _REENTRANT definition
6 dnl makes function strerror_r compiler visible.
8 AC_DEFUN([CHECK_NEED_REENTRANT_STRERROR_R], [
10 AC_MSG_NOTICE([DEBUG:])
11 AC_MSG_NOTICE([DEBUG:])
13 AC_LANG_FUNC_LINK_TRY([strerror_r])
15 AC_MSG_NOTICE([DEBUG: strerror_r links... yes])
18 AC_MSG_NOTICE([DEBUG: strerror_r links... no])
22 if test "$tmp_strerror_r" = "yes"; then
23 AC_EGREP_CPP([strerror_r],[
24 #include <sys/types.h>
27 AC_MSG_NOTICE([DEBUG: strerror_r proto... without our definition])
28 tmp_strerror_r="proto_wout_def"
30 AC_EGREP_CPP([strerror_r],[
32 #include <sys/types.h>
35 AC_MSG_NOTICE([DEBUG: strerror_r proto... with our _reentrant])
36 tmp_strerror_r="proto_with_def"
38 AC_MSG_NOTICE([DEBUG: strerror_r proto... not found])
43 if test "$tmp_strerror_r" = "proto_wout_def"; then
46 #include <sys/types.h>
52 AC_MSG_NOTICE([DEBUG: strerror_r proto wout finds... 3 args])
57 if test "$tmp_strerror_r" = "proto_with_def"; then
61 #include <sys/types.h>
67 AC_MSG_NOTICE([DEBUG: strerror_r proto with finds... 3 args])
68 tmp_strerror_r="needs_reentrant"
72 if test "$tmp_strerror_r" = "needs_reentrant"; then
73 ac_cv_need_reentrant="yes"
78 dnl CHECK_NEED_REENTRANT_STRTOK_R
79 dnl -------------------------------------------------
80 dnl Checks if the preprocessor _REENTRANT definition
81 dnl makes function strtok_r compiler visible.
83 AC_DEFUN([CHECK_NEED_REENTRANT_STRTOK_R], [
85 AC_MSG_NOTICE([DEBUG:])
86 AC_MSG_NOTICE([DEBUG:])
88 AC_LANG_FUNC_LINK_TRY([strtok_r])
90 AC_MSG_NOTICE([DEBUG: strtok_r links... yes])
93 AC_MSG_NOTICE([DEBUG: strtok_r links... no])
97 if test "$tmp_strtok_r" = "yes"; then
98 AC_EGREP_CPP([strtok_r],[
99 #include <sys/types.h>
102 AC_MSG_NOTICE([DEBUG: strtok_r proto... without our definition])
103 tmp_strtok_r="proto_wout_def"
105 AC_EGREP_CPP([strtok_r],[
107 #include <sys/types.h>
110 AC_MSG_NOTICE([DEBUG: strtok_r proto... with our _reentrant])
111 tmp_strtok_r="proto_with_def"
113 AC_MSG_NOTICE([DEBUG: strtok_r proto... not found])
118 if test "$tmp_strtok_r" = "proto_wout_def"; then
121 #include <sys/types.h>
127 AC_MSG_NOTICE([DEBUG: strtok_r proto wout finds... 3 args])
132 if test "$tmp_strtok_r" = "proto_with_def"; then
136 #include <sys/types.h>
142 AC_MSG_NOTICE([DEBUG: strtok_r proto with finds... 3 args])
143 tmp_strtok_r="needs_reentrant"
147 if test "$tmp_strtok_r" = "needs_reentrant"; then
148 ac_cv_need_reentrant="yes"
153 dnl CHECK_NEED_REENTRANT_LOCALTIME_R
154 dnl -------------------------------------------------
155 dnl Checks if the preprocessor _REENTRANT definition
156 dnl makes function localtime_r compiler visible.
158 AC_DEFUN([CHECK_NEED_REENTRANT_LOCALTIME_R], [
160 AC_MSG_NOTICE([DEBUG:])
162 AC_LANG_FUNC_LINK_TRY([localtime_r])
164 AC_MSG_NOTICE([DEBUG: localtime_r links... yes])
165 tmp_localtime_r="yes"
167 AC_MSG_NOTICE([DEBUG: localtime_r links... no])
171 if test "$tmp_localtime_r" = "yes"; then
172 AC_EGREP_CPP([localtime_r],[
173 #include <sys/types.h>
176 AC_MSG_NOTICE([DEBUG: localtime_r proto... without our definition])
177 tmp_localtime_r="proto_wout_def"
179 AC_EGREP_CPP([localtime_r],[
181 #include <sys/types.h>
184 AC_MSG_NOTICE([DEBUG: localtime_r proto... with our _reentrant])
185 tmp_localtime_r="proto_with_def"
187 AC_MSG_NOTICE([DEBUG: localtime_r proto... not found])
192 if test "$tmp_localtime_r" = "proto_wout_def"; then
195 #include <sys/types.h>
201 AC_MSG_NOTICE([DEBUG: localtime_r proto wout finds... 2 args])
202 tmp_localtime_r="done"
206 if test "$tmp_localtime_r" = "proto_with_def"; then
210 #include <sys/types.h>
216 AC_MSG_NOTICE([DEBUG: localtime_r proto with finds... 2 args])
217 tmp_localtime_r="needs_reentrant"
221 if test "$tmp_localtime_r" = "needs_reentrant"; then
222 ac_cv_need_reentrant="yes"
227 dnl CHECK_NEED_REENTRANT_GMTIME_R
228 dnl -------------------------------------------------
229 dnl Checks if the preprocessor _REENTRANT definition
230 dnl makes function gmtime_r compiler visible.
232 AC_DEFUN([CHECK_NEED_REENTRANT_GMTIME_R], [
234 AC_MSG_NOTICE([DEBUG:])
236 AC_LANG_FUNC_LINK_TRY([gmtime_r])
238 AC_MSG_NOTICE([DEBUG: gmtime_r links... yes])
241 AC_MSG_NOTICE([DEBUG: gmtime_r links... no])
245 if test "$tmp_gmtime_r" = "yes"; then
246 AC_EGREP_CPP([gmtime_r],[
247 #include <sys/types.h>
250 AC_MSG_NOTICE([DEBUG: gmtime_r proto... without our definition])
251 tmp_gmtime_r="proto_wout_def"
253 AC_EGREP_CPP([gmtime_r],[
255 #include <sys/types.h>
258 AC_MSG_NOTICE([DEBUG: gmtime_r proto... with our _reentrant])
259 tmp_gmtime_r="proto_with_def"
261 AC_MSG_NOTICE([DEBUG: gmtime_r proto... not found])
266 if test "$tmp_gmtime_r" = "proto_wout_def"; then
269 #include <sys/types.h>
275 AC_MSG_NOTICE([DEBUG: gmtime_r proto wout finds... 2 args])
280 if test "$tmp_gmtime_r" = "proto_with_def"; then
284 #include <sys/types.h>
290 AC_MSG_NOTICE([DEBUG: gmtime_r proto with finds... 2 args])
291 tmp_gmtime_r="needs_reentrant"
295 if test "$tmp_gmtime_r" = "needs_reentrant"; then
296 ac_cv_need_reentrant="yes"
301 dnl CHECK_NEED_REENTRANT_INET_NTOA_R
302 dnl -------------------------------------------------
303 dnl Checks if the preprocessor _REENTRANT definition
304 dnl makes function inet_ntoa_r compiler visible.
306 AC_DEFUN([CHECK_NEED_REENTRANT_INET_NTOA_R], [
308 AC_MSG_NOTICE([DEBUG:])
310 AC_LANG_FUNC_LINK_TRY([inet_ntoa_r])
312 AC_MSG_NOTICE([DEBUG: inet_ntoa_r links... yes])
313 tmp_inet_ntoa_r="yes"
315 AC_MSG_NOTICE([DEBUG: inet_ntoa_r links... no])
319 if test "$tmp_inet_ntoa_r" = "yes"; then
320 AC_EGREP_CPP([inet_ntoa_r],[
321 #include <sys/types.h>
322 #include <sys/socket.h>
323 #include <netinet/in.h>
324 #include <arpa/inet.h>
326 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto... without our definition])
327 tmp_inet_ntoa_r="proto_wout_def"
329 AC_EGREP_CPP([inet_ntoa_r],[
331 #include <sys/types.h>
332 #include <sys/socket.h>
333 #include <netinet/in.h>
334 #include <arpa/inet.h>
336 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto... with our _reentrant])
337 tmp_inet_ntoa_r="proto_with_def"
339 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto... not found])
344 if test "$tmp_inet_ntoa_r" = "proto_wout_def"; then
347 #include <sys/types.h>
348 #include <sys/socket.h>
349 #include <netinet/in.h>
350 #include <arpa/inet.h>
353 inet_ntoa_r(addr, 0);
356 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto wout finds... 2 args])
357 tmp_inet_ntoa_r="done"
360 if test "$tmp_inet_ntoa_r" = "proto_wout_def"; then
363 #include <sys/types.h>
364 #include <sys/socket.h>
365 #include <netinet/in.h>
366 #include <arpa/inet.h>
369 inet_ntoa_r(addr, 0, 0);
372 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto wout finds... 3 args])
373 tmp_inet_ntoa_r="done"
377 if test "$tmp_inet_ntoa_r" = "proto_with_def"; then
381 #include <sys/types.h>
382 #include <sys/socket.h>
383 #include <netinet/in.h>
384 #include <arpa/inet.h>
387 inet_ntoa_r(addr, 0);
390 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto with finds... 2 args])
391 tmp_inet_ntoa_r="needs_reentrant"
394 if test "$tmp_inet_ntoa_r" = "proto_with_def"; then
398 #include <sys/types.h>
399 #include <sys/socket.h>
400 #include <netinet/in.h>
401 #include <arpa/inet.h>
404 inet_ntoa_r(addr, 0, 0);
407 AC_MSG_NOTICE([DEBUG: inet_ntoa_r proto with finds... 3 args])
408 tmp_inet_ntoa_r="needs_reentrant"
412 if test "$tmp_inet_ntoa_r" = "needs_reentrant"; then
413 ac_cv_need_reentrant="yes"
418 dnl CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
419 dnl -------------------------------------------------
420 dnl Checks if the preprocessor _REENTRANT definition
421 dnl makes function gethostbyaddr_r compiler visible.
423 AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [
425 AC_MSG_NOTICE([DEBUG:])
427 AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
429 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r links... yes])
430 tmp_gethostbyaddr_r="yes"
432 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r links... no])
433 tmp_gethostbyaddr_r="no"
436 if test "$tmp_gethostbyaddr_r" = "yes"; then
437 AC_EGREP_CPP([gethostbyaddr_r],[
438 #include <sys/types.h>
441 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto... without our definition])
442 tmp_gethostbyaddr_r="proto_wout_def"
444 AC_EGREP_CPP([gethostbyaddr_r],[
446 #include <sys/types.h>
449 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto... with our _reentrant])
450 tmp_gethostbyaddr_r="proto_with_def"
452 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto... not found])
457 if test "$tmp_gethostbyaddr_r" = "proto_wout_def"; then
460 #include <sys/types.h>
463 gethostbyaddr_r(0, 0, 0, 0, 0);
466 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto wout finds... 5 args])
467 tmp_gethostbyaddr_r="done"
470 if test "$tmp_gethostbyaddr_r" = "proto_wout_def"; then
473 #include <sys/types.h>
476 gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0);
479 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto wout finds... 7 args])
480 tmp_gethostbyaddr_r="done"
483 if test "$tmp_gethostbyaddr_r" = "proto_wout_def"; then
486 #include <sys/types.h>
489 gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0);
492 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto wout finds... 8 args])
493 tmp_gethostbyaddr_r="done"
497 if test "$tmp_gethostbyaddr_r" = "proto_with_def"; then
501 #include <sys/types.h>
504 gethostbyaddr_r(0, 0, 0, 0, 0);
507 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto with finds... 5 args])
508 tmp_gethostbyaddr_r="needs_reentrant"
511 if test "$tmp_gethostbyaddr_r" = "proto_with_def"; then
515 #include <sys/types.h>
518 gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0);
521 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto with finds... 7 args])
522 tmp_gethostbyaddr_r="needs_reentrant"
525 if test "$tmp_gethostbyaddr_r" = "proto_with_def"; then
529 #include <sys/types.h>
532 gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0);
535 AC_MSG_NOTICE([DEBUG: gethostbyaddr_r proto with finds... 8 args])
536 tmp_gethostbyaddr_r="needs_reentrant"
540 if test "$tmp_gethostbyaddr_r" = "needs_reentrant"; then
541 ac_cv_need_reentrant="yes"
546 dnl CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
547 dnl -------------------------------------------------
548 dnl Checks if the preprocessor _REENTRANT definition
549 dnl makes function gethostbyname_r compiler visible.
551 AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
553 AC_MSG_NOTICE([DEBUG:])
555 AC_LANG_FUNC_LINK_TRY([gethostbyname_r])
557 AC_MSG_NOTICE([DEBUG: gethostbyname_r links... yes])
558 tmp_gethostbyname_r="yes"
560 AC_MSG_NOTICE([DEBUG: gethostbyname_r links... no])
561 tmp_gethostbyname_r="no"
564 if test "$tmp_gethostbyname_r" = "yes"; then
565 AC_EGREP_CPP([gethostbyname_r],[
566 #include <sys/types.h>
569 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto... without our definition])
570 tmp_gethostbyname_r="proto_wout_def"
572 AC_EGREP_CPP([gethostbyname_r],[
574 #include <sys/types.h>
577 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto... with our _reentrant])
578 tmp_gethostbyname_r="proto_with_def"
580 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto... not found])
585 if test "$tmp_gethostbyname_r" = "proto_wout_def"; then
588 #include <sys/types.h>
591 gethostbyname_r(0, 0, 0);
594 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto wout finds... 3 args])
595 tmp_gethostbyname_r="done"
598 if test "$tmp_gethostbyname_r" = "proto_wout_def"; then
601 #include <sys/types.h>
604 gethostbyname_r(0, 0, 0, 0, 0);
607 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto wout finds... 5 args])
608 tmp_gethostbyname_r="done"
611 if test "$tmp_gethostbyname_r" = "proto_wout_def"; then
614 #include <sys/types.h>
617 gethostbyname_r(0, 0, 0, 0, 0, 0);
620 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto wout finds... 6 args])
621 tmp_gethostbyname_r="done"
625 if test "$tmp_gethostbyname_r" = "proto_with_def"; then
629 #include <sys/types.h>
632 gethostbyname_r(0, 0, 0);
635 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto with finds... 3 args])
636 tmp_gethostbyname_r="needs_reentrant"
639 if test "$tmp_gethostbyname_r" = "proto_with_def"; then
643 #include <sys/types.h>
646 gethostbyname_r(0, 0, 0, 0, 0);
649 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto with finds... 5 args])
650 tmp_gethostbyname_r="needs_reentrant"
653 if test "$tmp_gethostbyname_r" = "proto_with_def"; then
657 #include <sys/types.h>
660 gethostbyname_r(0, 0, 0, 0, 0, 0);
663 AC_MSG_NOTICE([DEBUG: gethostbyname_r proto with finds... 6 args])
664 tmp_gethostbyname_r="needs_reentrant"
668 if test "$tmp_gethostbyname_r" = "needs_reentrant"; then
669 ac_cv_need_reentrant="yes"
674 dnl CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
675 dnl -------------------------------------------------
676 dnl Checks if the preprocessor _REENTRANT definition
677 dnl makes function getprotobyname_r compiler visible.
679 AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
681 AC_MSG_NOTICE([DEBUG:])
683 AC_LANG_FUNC_LINK_TRY([getprotobyname_r])
685 AC_MSG_NOTICE([DEBUG: getprotobyname_r links... yes])
686 tmp_getprotobyname_r="yes"
688 AC_MSG_NOTICE([DEBUG: getprotobyname_r links... no])
689 tmp_getprotobyname_r="no"
692 if test "$tmp_getprotobyname_r" = "yes"; then
693 AC_EGREP_CPP([getprotobyname_r],[
694 #include <sys/types.h>
697 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... without our definition])
698 tmp_getprotobyname_r="proto_wout_def"
700 AC_EGREP_CPP([getprotobyname_r],[
702 #include <sys/types.h>
705 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... with our _reentrant])
706 tmp_getprotobyname_r="proto_with_def"
708 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... not found])
713 if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
716 #include <sys/types.h>
719 getprotobyname_r(0, 0, 0, 0);
722 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 4 args])
723 tmp_getprotobyname_r="done"
726 if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
729 #include <sys/types.h>
732 getprotobyname_r(0, 0, 0, 0, 0);
735 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 5 args])
736 tmp_getprotobyname_r="done"
740 if test "$tmp_getprotobyname_r" = "proto_with_def"; then
744 #include <sys/types.h>
747 getprotobyname_r(0, 0, 0, 0);
750 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 4 args])
751 tmp_getprotobyname_r="needs_reentrant"
754 if test "$tmp_getprotobyname_r" = "proto_with_def"; then
758 #include <sys/types.h>
761 getprotobyname_r(0, 0, 0, 0, 0);
764 AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 5 args])
765 tmp_getprotobyname_r="needs_reentrant"
769 if test "$tmp_getprotobyname_r" = "needs_reentrant"; then
770 ac_cv_need_reentrant="yes"
775 dnl CHECK_NEED_REENTRANT_GETSERVBYPORT_R
776 dnl -------------------------------------------------
777 dnl Checks if the preprocessor _REENTRANT definition
778 dnl makes function getservbyport_r compiler visible.
780 AC_DEFUN([CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [
782 AC_MSG_NOTICE([DEBUG:])
784 AC_LANG_FUNC_LINK_TRY([getservbyport_r])
786 AC_MSG_NOTICE([DEBUG: getservbyport_r links... yes])
787 tmp_getservbyport_r="yes"
789 AC_MSG_NOTICE([DEBUG: getservbyport_r links... no])
790 tmp_getservbyport_r="no"
793 if test "$tmp_getservbyport_r" = "yes"; then
794 AC_EGREP_CPP([getservbyport_r],[
795 #include <sys/types.h>
798 AC_MSG_NOTICE([DEBUG: getservbyport_r proto... without our definition])
799 tmp_getservbyport_r="proto_wout_def"
801 AC_EGREP_CPP([getservbyport_r],[
803 #include <sys/types.h>
806 AC_MSG_NOTICE([DEBUG: getservbyport_r proto... with our _reentrant])
807 tmp_getservbyport_r="proto_with_def"
809 AC_MSG_NOTICE([DEBUG: getservbyport_r proto... not found])
814 if test "$tmp_getservbyport_r" = "proto_wout_def"; then
817 #include <sys/types.h>
820 getservbyport_r(0, 0, 0, 0);
823 AC_MSG_NOTICE([DEBUG: getservbyport_r proto wout finds... 4 args])
824 tmp_getservbyport_r="done"
827 if test "$tmp_getservbyport_r" = "proto_wout_def"; then
830 #include <sys/types.h>
833 getservbyport_r(0, 0, 0, 0, 0);
836 AC_MSG_NOTICE([DEBUG: getservbyport_r proto wout finds... 5 args])
837 tmp_getservbyport_r="done"
840 if test "$tmp_getservbyport_r" = "proto_wout_def"; then
843 #include <sys/types.h>
846 getservbyport_r(0, 0, 0, 0, 0, 0);
849 AC_MSG_NOTICE([DEBUG: getservbyport_r proto wout finds... 6 args])
850 tmp_getservbyport_r="done"
854 if test "$tmp_getservbyport_r" = "proto_with_def"; then
858 #include <sys/types.h>
861 getservbyport_r(0, 0, 0, 0);
864 AC_MSG_NOTICE([DEBUG: getservbyport_r proto with finds... 4 args])
865 tmp_getservbyport_r="needs_reentrant"
868 if test "$tmp_getservbyport_r" = "proto_with_def"; then
872 #include <sys/types.h>
875 getservbyport_r(0, 0, 0, 0, 0);
878 AC_MSG_NOTICE([DEBUG: getservbyport_r proto with finds... 5 args])
879 tmp_getservbyport_r="needs_reentrant"
882 if test "$tmp_getservbyport_r" = "proto_with_def"; then
886 #include <sys/types.h>
889 getservbyport_r(0, 0, 0, 0, 0, 0);
892 AC_MSG_NOTICE([DEBUG: getservbyport_r proto with finds... 6 args])
893 tmp_getservbyport_r="needs_reentrant"
897 if test "$tmp_getservbyport_r" = "needs_reentrant"; then
898 ac_cv_need_reentrant="yes"
903 dnl CHECK_NEED_REENTRANT_FUNCTIONS_R
904 dnl -------------------------------------------------
905 dnl Checks if the preprocessor _REENTRANT definition
906 dnl makes several _r functions compiler visible.
907 dnl Internal macro for CONFIGURE_REENTRANT.
909 AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
910 if test "$ac_cv_need_reentrant" = "no"; then
911 CHECK_NEED_REENTRANT_STRERROR_R
913 if test "$ac_cv_need_reentrant" = "no"; then
914 CHECK_NEED_REENTRANT_STRTOK_R
916 if test "$ac_cv_need_reentrant" = "no"; then
917 CHECK_NEED_REENTRANT_LOCALTIME_R
919 if test "$ac_cv_need_reentrant" = "no"; then
920 CHECK_NEED_REENTRANT_GMTIME_R
922 if test "$ac_cv_need_reentrant" = "no"; then
923 CHECK_NEED_REENTRANT_INET_NTOA_R
925 if test "$ac_cv_need_reentrant" = "no"; then
926 CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
928 if test "$ac_cv_need_reentrant" = "no"; then
929 CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
931 if test "$ac_cv_need_reentrant" = "no"; then
932 CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
934 if test "$ac_cv_need_reentrant" = "no"; then
935 CHECK_NEED_REENTRANT_GETSERVBYPORT_R
939 AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG], [
940 CHECK_NEED_REENTRANT_STRERROR_R
941 CHECK_NEED_REENTRANT_STRTOK_R
942 CHECK_NEED_REENTRANT_LOCALTIME_R
943 CHECK_NEED_REENTRANT_GMTIME_R
944 CHECK_NEED_REENTRANT_INET_NTOA_R
945 CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
946 CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
947 CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
948 CHECK_NEED_REENTRANT_GETSERVBYPORT_R
952 dnl CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
953 dnl -------------------------------------------------
954 dnl This macro ensures that configuration tests done
955 dnl after this will execute with preprocessor symbol
956 dnl _REENTRANT defined. This macro also ensures that
957 dnl the generated config file will equally define it.
958 dnl Internal macro for CONFIGURE_REENTRANT.
960 AC_DEFUN([CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
961 AH_VERBATIM([NEED_REENTRANT],
962 [/* Configure process defines NEED_REENTRANT to 1 when it finds out that */
963 /* _REENTRANT is required or already defined for proper configuration. */
964 @%:@undef NEED_REENTRANT
965 @%:@if defined(NEED_REENTRANT) && !defined(_REENTRANT)
966 @%:@ define _REENTRANT
968 cat >>confdefs.h <<_ACEOF
969 [@%:@ifndef _REENTRANT
970 @%:@ define _REENTRANT
973 AC_DEFINE(NEED_REENTRANT, 1, [])
977 dnl CONFIGURE_REENTRANT
978 dnl -------------------------------------------------
979 dnl This first checks if the preprocessor _REENTRANT
980 dnl symbol is already defined. If it isn't currently
981 dnl defined a set of checks are performed to verify
982 dnl if its definition is required to make visible to
983 dnl the compiler a set of *_r functions. Finally, if
984 dnl _REENTRANT is already defined or needed it takes
985 dnl care of making adjustments necessary to ensure
986 dnl that it is defined equally for further configure
987 dnl tests and generated config file.
989 AC_DEFUN([CONFIGURE_REENTRANT], [
991 AC_MSG_CHECKING([if _REENTRANT is already defined])
998 force compilation error
1002 AC_MSG_RESULT([yes])
1003 tmp_reentrant_initially_defined="yes"
1006 tmp_reentrant_initially_defined="no"
1009 if test "$tmp_reentrant_initially_defined" = "no"; then
1010 AC_MSG_CHECKING([if _REENTRANT is actually needed])
1011 ac_cv_need_reentrant="no"
1012 CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG
1013 if test "$ac_cv_need_reentrant" = "yes"; then
1014 AC_MSG_RESULT([yes])
1020 AC_MSG_CHECKING([if _REENTRANT is onwards defined])
1021 if test "$tmp_reentrant_initially_defined" = "yes" ||
1022 test "$ac_cv_need_reentrant" = "yes"; then
1023 CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
1024 AC_MSG_RESULT([yes])