8 * You may not use this file except in compliance with the License.
9 *
10 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 * or http://www.opensolaris.org/os/licensing.
12 * See the License for the specific language governing permissions
13 * and limitations under the License.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 * If applicable, add the following below this CDDL HEADER, with the
18 * fields enclosed by brackets "[]" replaced with your own identifying
19 * information: Portions Copyright [yyyy] [name of copyright owner]
20 *
21 * CDDL HEADER END
22 */
23 /*
24 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28 /*
29 * This is not "#ifdef TEAMWARE_MAKE_CMN" because we're currently
30 * using the TW fake i18n headers and libraries to build both
31 * SMake and PMake on SPARC/S1 and x86/S2.
32 */
33
34 #include <avo/intl.h>
35 #include <limits.h> /* MB_LEN_MAX */
36 #include <stdio.h>
37 #include <stdlib.h> /* wchar_t */
38 #include <string.h> /* strcmp() */
39 #include <nl_types.h> /* catgets() */
40 #include <sys/param.h> /* MAXPATHLEN */
41 #include <sys/types.h> /* time_t, caddr_t */
42 #include <vroot/vroot.h> /* pathpt */
43 #include <sys/time.h> /* timestruc_t */
44 #include <errno.h> /* errno */
45
46 #include <wctype.h>
47 #include <widec.h>
48
49
50 /*
51 * A type and some utilities for boolean values
52 */
53
885 extern Boolean make_word_mentioned;
886 extern Makefile_type makefile_type;
887 extern char mbs_buffer[];
888 extern Name path_name;
889 extern Boolean posix;
890 extern Name query;
891 extern Boolean query_mentioned;
892 extern Name hat;
893 extern Boolean reading_environment;
894 extern Name shell_name;
895 extern Boolean svr4;
896 extern Name target_arch;
897 extern Name target_mach;
898 extern Boolean tilde_rule;
899 extern wchar_t wcs_buffer[];
900 extern Boolean working_on_targets;
901 extern Name virtual_root;
902 extern Boolean vpath_defined;
903 extern Name vpath_name;
904 extern Boolean make_state_locked;
905 #if defined (TEAMWARE_MAKE_CMN)
906 extern Boolean out_err_same;
907 #endif
908 extern pid_t childPid;
909 extern nl_catd libmksh_catd;
910
911 /*
912 * RFE 1257407: make does not use fine granularity time info available from stat.
913 * High resolution time comparison.
914 */
915
916 inline int
917 operator==(const timestruc_t &t1, const timestruc_t &t2) {
918 return ((t1.tv_sec == t2.tv_sec) && (t1.tv_nsec == t2.tv_nsec));
919 }
920
921 inline int
922 operator!=(const timestruc_t &t1, const timestruc_t &t2) {
923 return ((t1.tv_sec != t2.tv_sec) || (t1.tv_nsec != t2.tv_nsec));
924 }
925
926 inline int
927 operator>(const timestruc_t &t1, const timestruc_t &t2) {
|
8 * You may not use this file except in compliance with the License.
9 *
10 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 * or http://www.opensolaris.org/os/licensing.
12 * See the License for the specific language governing permissions
13 * and limitations under the License.
14 *
15 * When distributing Covered Code, include this CDDL HEADER in each
16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 * If applicable, add the following below this CDDL HEADER, with the
18 * fields enclosed by brackets "[]" replaced with your own identifying
19 * information: Portions Copyright [yyyy] [name of copyright owner]
20 *
21 * CDDL HEADER END
22 */
23 /*
24 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28 #include <avo/intl.h>
29 #include <limits.h> /* MB_LEN_MAX */
30 #include <stdio.h>
31 #include <stdlib.h> /* wchar_t */
32 #include <string.h> /* strcmp() */
33 #include <nl_types.h> /* catgets() */
34 #include <sys/param.h> /* MAXPATHLEN */
35 #include <sys/types.h> /* time_t, caddr_t */
36 #include <vroot/vroot.h> /* pathpt */
37 #include <sys/time.h> /* timestruc_t */
38 #include <errno.h> /* errno */
39
40 #include <wctype.h>
41 #include <widec.h>
42
43
44 /*
45 * A type and some utilities for boolean values
46 */
47
879 extern Boolean make_word_mentioned;
880 extern Makefile_type makefile_type;
881 extern char mbs_buffer[];
882 extern Name path_name;
883 extern Boolean posix;
884 extern Name query;
885 extern Boolean query_mentioned;
886 extern Name hat;
887 extern Boolean reading_environment;
888 extern Name shell_name;
889 extern Boolean svr4;
890 extern Name target_arch;
891 extern Name target_mach;
892 extern Boolean tilde_rule;
893 extern wchar_t wcs_buffer[];
894 extern Boolean working_on_targets;
895 extern Name virtual_root;
896 extern Boolean vpath_defined;
897 extern Name vpath_name;
898 extern Boolean make_state_locked;
899 extern Boolean out_err_same;
900 extern pid_t childPid;
901 extern nl_catd libmksh_catd;
902
903 /*
904 * RFE 1257407: make does not use fine granularity time info available from stat.
905 * High resolution time comparison.
906 */
907
908 inline int
909 operator==(const timestruc_t &t1, const timestruc_t &t2) {
910 return ((t1.tv_sec == t2.tv_sec) && (t1.tv_nsec == t2.tv_nsec));
911 }
912
913 inline int
914 operator!=(const timestruc_t &t1, const timestruc_t &t2) {
915 return ((t1.tv_sec != t2.tv_sec) || (t1.tv_nsec != t2.tv_nsec));
916 }
917
918 inline int
919 operator>(const timestruc_t &t1, const timestruc_t &t2) {
|