Maybe i should add: in principle it doesn't matter how your program stores matrices, whether column or row major. As long as you deliver the matrix data to a uniform as a contiguous array of 16 floats, column after column in case of column major and row after row in case of row major ordering. Anyhow you store it - for example as an array of 4 vectors, column or row vectors banana, of arrays of 4 float each - the &matrix[0][0] (C/C++ notation) with a length of 16 floats will correctly transmit the column or row major data to glUniformMatrix4fv.
The OpenGL documentation says that for example in a model matrix, the transformation part must occupy the places 13, 14 and 15 in the array of 16 floats.
Half of the world laments a column-wise storage, the other half a row-wise. Both are correct. Do your own math lib, then you have the control ?