Replace the GNU 'hsearch' function with a custom hash table implementation as the `hsearch' function is implemented differently on Linux and Mac (MAC deallocates the associated data automatically, while Linux does not), causing either memory leaks or double frees.
Replace the GNU 'hsearch' function with a custom hash table implementation as the `hsearch' function is implemented differently on Linux and Mac (MAC deallocates the associated data automatically, while Linux does not), causing either memory leaks or double frees.