+#else
+ hptr = LookupHREC(sstr + index);
+
+ // Symbol isn't in the table, so try to add it:
+ if (hptr == NULL)
+ {
+ if (AddSymbolToHashList(&htable[GetHash(sstr + index)],
+ sstr + index, Ofile, value, type))
+ return 1;
+ }
+ else
+ {
+ // Symbol already exists, decide what to do about it
+ if (iscommon(hptr->h_type))
+ {
+ // Mismatch: common came first; warn and keep the global
+ if (wflag)
+ {
+ printf("Warning: %s: global from ", sstr + index);
+ put_name(Ofile);
+ printf(" used, common from ");
+ put_name(hptr->h_ofile);
+ printf(" discarded.\n");
+ }
+
+ hptr->h_ofile = Ofile;
+ hptr->h_type = type;
+ hptr->h_value = value;
+ }
+ else
+ {
+ // Global exported by another ofile; warn and make this one
+ // extern
+ if (wflag)
+ {
+ printf("Duplicate symbol %s: ", sstr + index);
+ put_name(hptr->h_ofile);
+ printf(" used, ");
+ put_name(Ofile);
+ printf(" discarded\n");
+ }
+
+ // Set the global in this unit to pure external
+ // (is this a good idea? what if the other one is a ref to
+ // this one???)
+ putlong(sfix + 4, T_EXT);
+ }
+ }
+#endif