You have had so long to prepare for this exam.
What part of speech is 'long' in that sentence?
The authors of
The Cambridge Grammar of the English Language (see page 569) categorize
long as an adverb in such syntactic contexts, despite its appearing to be a noun there, and despite the phrase it heads being "functionally comparable" to an NP—indeed,
so long functions as the direct object of
had in your example.
Their reasoning is that
long can have "dependents," such as
so and
as and
very, which indicate "that it is an adverb, not a noun." The related example they give is
You won't have very long to wait. "Notice, moreover, that such AdvPs cannot replace temporal NPs in subject function:
A long time / *Long had passed since their last meeting" (
ibid.).
As to the awkwardness of your example, the problem is that it does not contain negation. Both
The Cambridge Grammar of the English Language (2002) and
A Comprehensive Grammar of the English Language (1985, see the footnotes on page 541) contain the observation that
long in such usage tends to work only in nonassertive/nonaffirmative contexts:
You haven't had so long to prepare for this exam.
You haven't had very long to prepare for this exam.
How long have you had to prepare for this exam?
That said, I think your example would be less awkward with heavy stress on
so long (this requiring a special context):
You have had SO LONG to prepare for this exam.
Also, it would be less awkward, even without heavy stress on
so long, if
only were added:
You have only had so long to prepare for this exam.