According to R Engelking - General Topology:
A topological space $X$ is called a compact space if $X$ is a Hausdorff space and every open cover of $X$ has a finite subcover, i.e., if for every open cover ${\{U_s}\}_{s\in S}$ of the space $X$ there exists a finite set ${\{s_1,s_2, \dots , s_k}\}\subset S$ such that $X = U_{s_1}\cup U_{s_2}\cup \dots U_{s_k}$.*
And $^*$ means its footnote:
The reader should be warned that some authors do not include the assumption that $X$ is a Hausdorff space in the definition of compactness.
Actually, I have seen non-inclusion of Hausdorffness in definition of compactness in C Adams & R Franzosa's Introduction to Topology. Pure and Applied!
My questions are: If Engelking's book is right,
Why Hausdorffness of a space as a requirement for compactness is omitted in (especially undergraduate) texts even though Hausdorffness is a concept that is taught in those books?!
Would someone please give an example of a space that is compact according to the definition without Hausdorffness, and that is not a Hausdorff space?
Thank you.
EDIT - One definition must be correct; because compactness is equivalent to many other statements e.g. closeness+boundedness (?) ; Does any equivalence of compactness still hold if it is not Hausdorff?
EDIT 2 - I think Engelking's definition is wrong in the last sentence since it must be $X \subset U_{s_1}\cup U_{s_2}\cup \dots U_{s_k}$ (?)
There are many examples. The simplest is any space $X$ with more than one point that has the indiscrete topology, $\{\varnothing,X\}$. The simplest $T_1$ examples are any infinite set with the cofinite topology. The line with two origins is another $T_1$ example.
Many of us topologists feel that there is no good reason to include Hausdorffness in the definition of compactness and prefer simply to add the requirement and then talk about compact Hausdorff spaces when Hausdorffness is actually required for something. Those who prefer to include Hausdorffness in the definition of compactness seem to be mostly influenced either by Bourbaki or by category theory.